Is there a Write Side to the Web?
Stu Charlon presented a set of slides at the WWW 2011 workshop on RESTful design titled "the Write Side of the Web". If the "read side" has been quite successful, "writing" information to the Web is not that easy, as some may have originally claimed at the height of the REST hype. The Write side it requires a fairly strong agreement, a.k.a coupling, between the client and the server in terms of semantics and error handling.
The Read Side The Write Side
- Atom & RSS feeds
- Semantic Web
- Facebook Status
- Media Sharing
Stu explains that the growth in centralized services, which people increasingly call APIs and the need for system integration demand a better write side. Many so called RESTful design are diverging because there is not a commonly agreed way to handle the write side:
REST is not CRUD (Create, Read, Update, Delete), neither is HTTP. Post does not map directly to 'create' and CRUD itself leads to complexity at scale
CRUD actually requires a strong out-of-band agreement on validation rules and exception handling, in particular when it comes to CRUDing a series of states with specific transitions between them. In that case, the client needs to understand the server side state machine, at least partially. In his presentation, Stu details an Hypermedia-based programming model where the client "is an agent acting in an information space". He suggests tha client be:
Has an hypermedia workspace
Sense to "pick up on effects"
People are only starting to discover the "Write side" and looking at most APIs these days, nobody is really taking the time to check if they are designing these APIs in a RESTful way. RESTfulie for instance is offering some interesting concepts on the server, in line with Stu's proposal, but in any case the client, and the agreement between the client and the server remains a problem that has been grossly overlooked by the REST community.
Are you designing "write side" APIs? what is your take on it?
Chris Mattmann Apr 15, 2014