The most interesting thread on the rest-discuss list in a long time begins with a simple request for assistance: How to implement a query with a long query string? Most of the RESTigentsia weighed in before it was all over, and Roy Fielding gave Mark Baker the business, though it wasn't deserved.
And I learned something. As Roy pointed out, I had not appreciated the role of "hypertext as the engine of application state".
This idea illuminates a whole world actually.
The HTTP application protocol -- the type section for a REST application framework -- enables lots of different applications all to run on the same fabric. Roy points out, in applications using HTML, clients know something about how to process the GET, based on the context. Both the <a> and <img> tags retrieve resources using GET. Browsers know how to render the returned entity differently depending on whether the HTML referenced the resouce using <a> or <img>. REST folks use "self-descriptive" to refer to entities like HTML documents, that indicate to knowing agents how to process the resource references in them.
And lots of other agents are out there on the web, non-HTML agents, knowing nothing about how to process <a> and <img> tags. And these agents will ordinarily never encounter those tags. If you've written an agent to process some XML dialect, your agent normally navigates among documents of that type.
So all kinds of applications out there are blissfully navigating via HTTP, and mostly they don't know how to make sense of one another's resources.
(For the case of POST, every application -- heck every resource -- can have wildly different semantics. On his blog, Mark Nottingham gives an excellent discourse on the topic).
So the REST world is this world of a few verbs, and zillions of nouns. And the nouns form clusters around the semantics they honor. In the case of HTTP, you have clusters of nouns that understand HTML. You have other clusters that understand XML+Xlink. Still others understand XML+RDF. And a jillion more understand their own custom media in whatever idiosyncratic way the application authors wanted. The apps in each cluster all play on the web, oblivious to the apps in the other clusters.
`
Hugh Winkler holding forth on computing and the Web
Saturday, October 30, 2004
Subscribe to:
Posts (Atom)