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-27

new code commited to tree

i committed a handful of changes to the exyus @ googlecode project this evening. updated the error-rendering for all the Resource classes. they now all honor the media-types requested by the client.

i also broke down and added a protected Hashtable shared-args to the base class (HTTPResource). this allows child classes to collect custom name/value pairs and pass that down to parent classes. needed this to handle generated ids for the codebreaker game and i can see it for other cases. i want to stay clear of too much 'property-bag' stuff, but since this is within the same class instance, i think this is ok.

i also did more work on the codebreaker game project. the code checked in is still rough, but it's starting to come together (and i'm having fun playing it!). i suspect it will be posted as a live demo this weekend.

finally, i suspect another round of refactoring is in the near future. i can see several places where the code looks the same and could be moved to a shared routine. doing a good job of refactoring will make creating custom classes off the base much easier, too.

2008-03-23

UGData Tutorial Posted

I added a new tutorial to the site. This one covers the details of using SQL Server as the data-store for HTTP/REST-compliant apps. Here's the abstract:

In this tutorial you'll learn how to build database-backed REST-ful applications using the exyus engine. You'll learn how to build stored procedures for SQL Server that output XML for use with the XmlSqlResource class in exyus. You'll learn how to use the XmlSqlResource base class to define your own database-backed HTTP Resource. And you'll learn how to use XSL transforms and XSD Schema documents to control the processing of inbound client requests and generating outbound server responses. Finally, you'll learn how you can use simple HTML FORMs to support not just GET and POST, but also PUT and DELETE HTTP methods.

You can test the online version of the UGData application.

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.

2008-03-11

Committed DB Support to exyus basline

i've spent a good chunk of time beating on the XmlSqlResource class in exyus this week. and i found a few glitches. along the way i've revamped the support for handling exception rendering (now tied more closely to the representation headers ((Accept/Content-Type) and i've improved the details of POST-ing for update and delete (via a 'proxy pattern' that i'll blog about soon). i also tweaked a few other things in the engine this week. all good stuff.

however...

because of the time i spent updating *and* because of some personal issues this week, i'm not ready to release a new runtime update [sigh]. this next one will be a version bump (0.5 to 0.6) and i still need to sort out some details. that means it will be three weeks (at least) since the last runtime update - bad stuff.

hopefully, i can put together the details of the runtime during the week and release soon.

2008-03-03

t-sql for exyus all checked in

i was able to power through the rest of t-sql support for the XmlSqlResource class in exyus this evening. full support for PUT(create/update) w/ ETags. it went easier than i thought it would. the ETag code from the XmlFileResource was very easy to drop in and tweak. nice to see that HTTP calls (HEAD w/ ETag) work like a champ for any representation [grin]!

i still need to beat this up for a bit and clean out the cobwebs and such. but i should have a solid release within a day or so. i had fun whipping up transforms for text/xml and text/html representations for a simple resource. i find myself starting to think pretty easily in mime-types and transformations - at least for HTML and XML types. i still have to do some work to get my head to easily think in JSON, tho.

anyway, fun evening and it's all booked into source control - sweet!

2008-03-02

rewriting t-sql support in exyus

data i finally bit the bullet and started a complete rewrite of the t-sql support in exyus this weekend. i'd been dreading it for a while, but knew it had to be done. so much has changed since i wrote the SqlXmlResource class late last year. in fact, so much drift had occurred since i last used the t-sql resource, i just marked is as // not working! in order to keep folks from getting hurt.

anyway, the rewrite has been going very well. i've got GET/HEAD, POST, and DELETE support done. still need to implement the full PUT (create/update) w/ ETag support, tho. i've also run into a few new items regarding redirection options for POST and DELETE. i've got a bit of work to do to make sure the proper URI is composed for redirects for POST, too. but, all in all, it's gone well and i a should have a new release posted early this week. it's been a while since i had a meaningful update and it will be nice to get some good stuff out there.

once the t-sql support is updated and tested, i'm looking forward to some new demo apps and articles covering how easy it is to publish database-backed end-points with exyus.