Hypermedia is the New REST

, Wellesley, MA

I’ve been doing a lot of reading about web APIs, and I’ve come to the following conclusions:

  1. RPC web services are out. Resources and representations are in.

  2. API marketing has commandeered the term REST, and the vast majority of today’s APIs fall short of the REST that Roy Fielding defined.

  3. Hypermedia is the future, and those of us who want to live in that future have to build it. Not enough of it exists to just use what others have already built.1

  4. Hypermedia API designs will require a larger initial investment in server and client design and implementation, with a benefit of greater forward compatibility — resiliency to change over the long term.

The term REST has been so thoroughly overused that it’s nearly impossible to learn about its future by searching for reading material using REST as a keyword. Thankfully, the community moving Fielding’s ideas forward is using hypermedia to describe their work instead. Once you make the keyword switch, there’s a wealth of information with little accompanying noise drowning out the signal.

  1. I’ve read the first quarter of Mike Amundsen’s book Building Hypermedia APIs with HTML5 and Node, and I’m eagerly looking forward to the rest. The title undersells the book’s content. It’s about quality media type design for hypermedia APIs, and the benefits and drawbacks of hypermedia in various API contexts. Node and HTML5 are just the tools Mike uses to illustrate the concepts.

  2. JSON is in as the web and mobile’s preferred data interchange format, but it’s lacking any way in the box to express hypermedia affordances. A bunch of people are thinking about that problem and working on solutions from various angles. Each of the existing solutions is lacking something — standardization, tool support, community traction. I’m watching the progress of Mike Amundsen’s Collection+JSON and Mike Kelly’s HAL. Mike Amundsen registered Collection+JSON with the IANA, but it looks like its only complete implementation is in Java so far. HAL enjoys broader language support, but fewer hypermedia affordances compared with Collection+JSON. Mark Nottingham wrote about a number of other efforts including JSON-LD and JSON Reference in a late 2011 blog post.

  3. I read all of Steve Klabnik’s promising e-book in progress, Designing Hypermedia APIs. It was Steve’s e-book that really opened my mind to the hypermedia movement happening and convinced me to invest the time in reading Mike Amundsen’s book. Steve is actively working on updating the book, and there’s a lot of great conversation on the associated mailing list.

  4. Martin Fowler and Darrel Miller have blogged about REST maturity models for servers and clients respectively. Leonard Richardson’s talk inspired Martin’s post, which in turn inspired Darrel’s post.

I suspect my appetite for reading about hypermedia will give way to building hypermedia while I’m reading Building Hypermedia APIs with HTML5 and Node. If not, the following look like promising further reading:

1 I’m talking about hypermedia for APIs and resilient automated clients. Obviously, hypermedia is well established for web user interfaces.

Enjoyed reading this post? Discuss it on Reddit, or follow me on Twitter.