Exyus is an HTTP/REST engine written for the Windows/ASP.NET platform. this blog lists code changes and other important updates to the code base.

2008-03-18

V0.6 release of exyus includes DB Support

i finally got around to packaging up the db support for exyus. turns out it has been four weeks since the last release - wow.

i also incremented the version from 0.05 to 0.06 since the database support is a major change. i built a couple of sample db-based apps as part of testing. the strongest one right now is the User Group Members example. this one is interesting because it offers a way to handle DELETE and PUT via FORM POST. even though DELETE and PUT were in the HTTP web spec early on, it remains unsupported by the common browsers. my solution is to overload the document id that is the target of the POST. for example:


-- standard HTTP methods
POST /resource/ (creates a new document)
GET /resource/1 (gets an existing document)
PUT /resource/1 (updates an existing document)
DELETE /resource/1 (deletes an existing document)

-- handling PUT and DELETE via FORM POST
POST /resource/1;update (updates an existing document)
POST /resource/1;delete (deletes an existing document)

the last two examples show the overloaded document id in action. on the server tehre is a URI roule that accepts the /resource/{id};update pattern and then executes the PUT or DELETE as expected. this makes sure the actual PUT/DELETE are logged in the server logs and reduces the amount of special coding needed to support POSTed PUT/DELETE. it also makes sure that any cache invalidation rules you have for PUT or DELETE will be properly honored.

anyway, lots of other cool stuff are in this update. i'll post about them over the next few days.

No comments: