Hypermedia Clients

by Subbu Allamaraju on April 25, 2008

This is in response to Mike Amundsen’s post on hypermedia. I started commenting on his blog, but then realized I have more to say than what I could fit in the comment form.

Mike’s questions are, for REST-ful applications that use JSON for representing resources, (a) "where is the hypermedia (links and forms)" and (b) "what standardized clients understand how to render these elements propertly?"

As far as machine clients are concerned, (X)HTML has the advantage of a set of universal clients, a browser being the most common one, that can fully take advantage of hypermedia. In addition, browsers can render representations as well as controls to search and modify resources. But that does not mean that the goal of REST’s hypermedia constraint is to allow building such automated applications.

Assisted by the Atom Publishing Protocol, Atom Syndication Format has the advantage of a (smaller) set of generic clients that can deal with the hypermedia, but mostly in the blogging space. But when it comes to other applications of Atom and Atom Publishing Protocol, there are not any (at least to my knowledge) clients that can consume the hypermedia in a generic manner.

Take for example, OpenSocial, GData or Astoria where Atom feed/entry format is used to represent arbitrary resources like contacts, friends etc. In these cases, the purpose of the hypermedia is to take some guesswork out of client applications, and help client applications know how to fetch, create, modify or delete resources. For instance, client applications do not need to guess where to PUT to update a resource, or where to POST to create new resource. URIs for GET, POST, PUT and DELETE are expressed within representations of resources and collections of resources. This is hypermedia, as far as I understand it.

Now, similar information can be embedded in other media types as well, including application/json, if so desired. As far as the Atom Publishing Protocol is concerned, isn’t it just "a" profile of HTTP 1.1 using RFC 4287 for expressing representations of resources?

Leave a Comment

Previous post:

Next post: