One of the often overlooked, IMO yet important features of RESTful applications is “hypermedia as the engine of application state” (or HATEOS as RESTafarians prefer it 😉 – Roy commented on this issue a while ago:
When representations are provided in hypertext form with typed relations (using microformats of HTML, RDF in N3 or XML, or even SVG), then automated agents can traverse these applications almost as well as any human. There are plenty of examples in the linked data communities. More important to me is that the same design reflects good human-Web design, and thus we can design the protocols to support both machine and human-driven applications by following the same architectural style.
As far as I can tell, most people get the stuff (more or less) right concerning nouns (resources, URIs) and verbs (HTTP methods such as GET, POST, etc.) but neglect the HATEOS part. I’m not sure why this is so, but for a start let’s have a look at available formats:
- Most obviously one can use HTML with its official link types or with microformats (for historic reasons see also a proposal for a wider spectrum of link types and for ongoing discussions you might want to keep an eye on the @rel attribute discussion).
- Many people use Atom (concerning RDF, see also the interesting discussion via Ed Summer’s blog)
- There are a few non-standard, in-house solutions (for example the one discussed in an InfoQ article)
Summing up, one could understand that there is a need for a standard format that allows to represent typed links in an extensible way and is able to serve humans and machines. In 2008 I argued that RDFa is very well suited for Linked Data and now I’m about to extend this slightly: one very good way to realise HATEOS is indeed RDFa.
Happy to hear your thoughts about this (admittedly bold) statement!