World Wide Webber


My Books
REST in Practice: Hypermedia and Systems Architecture
Now available on Rough Cuts
Developing Enterprise Web Services by Sandeep Chatterjee and Jim Webber
Amazon:
US, UK, Canada, Germany, France
Now available: Korean Edition

My Bookshelf
Programming Clojure by Stuart Halloway

RESTful Web Services by Leonard Richardson and Sam Ruby
HATEOAS - The Confusing Bit from REST
Posted: 26 May 2009 @ 20:52 UT from Seattle, US

Prior to last week’s excellent Falando em Java conference in São Paulo, I spent some time with the lovely folks at Caelum. They invited me to talk at their in-house tech day where I spoke about hypermedia as a contract language for describing business protocols. After some prompting from Emil, my talk has gotten some twitter love, so it’s worth pointing out that it’s available on the big Web too.

Cue Pink Floyd ripoff, “we don’t need no static contracts… hey, WSDL, leave that Web alone”

Comments:
#

great slide deck!

#

Your presentations in Falando em Java were fantastic! Congratulations!

#

Congratulations Jim! 

Your talks were amazing! I hope to see you in Falando em Java Conference next year again!

#

Jim! Thanks for your talks... they were just incredible!

#

That was indeed a great slide deck. I have passed this along to several colleagues.

#

Jim, I think there's an aspect of HATEOAS that's completely underrepresented in all treatments: How does the client know about the semantics of the links it could follow next. 

Commendably, you point out the importance of media types, but then you leave it at that. Is there anything to the media type beyond its unique name? Are client and server just acting on a common (mis-)understanding of what is implied by the media types they are using? 

Media types are the 500 pound gorilla in the HATEOAS room that. At best, as in your presentation, its existence and importance is acknowledged. But curiously, not much beyond that is said. 

Taking application/vnd.restbucks+xml as an example, how do I specify unambiguously what it means to follow a rel="payment" link? 

I assume this is written down somewhere in human, not machine, understandable English and encoded appropriately in the client and server software. If that is the case, then both do in fact know everything about the protocol. There's no protocol left in the hypermedia structure; what this structure still conveys is which subset of the possible transitions is actually available at each point in the conversation. That is important, of course, but only a (small?) part of the complete protocol.

#

Hi Michael, 

The media type specifies "look for links in here" which gets us halfway there as you point out. 

The resbucks protocol description expresses the link annotations and semantics (it's just a microformat). From that you can build a client which drives the workflow. 

On the client side, you use pattern matching (or rules engine, or lots of nasty nested if-else statements) to drive the protocol. 

At this risk of being a salesman, we're writing a book about this :-) 

Jim

#

Jim, 

even if it is "just a microformat" it has to be specified somewhere. And, on top of that, server and client have to agree to use it. 

It's likely that I'm just reacting badly to overblown claims for HATEOAS, that I think are often implied. For a slightly lengthier explanation of what I mean, see 

http://www.schuerig.de/michael/blog/index.php/2009/06/04/humble-hateoas/ 

I'm looking forward to the book.

Author Name:
Email:
Author URL:
Comment:
Antispam:
Please type the following string (note that if the strings don't match, your comment will be lost... sorry!): 'YMLH'.
 
Recent entries

Recent comments

Feeds:
RSS 2.0 Atom