The Labours of Hypermedia

Going full-on with hypermedia takes some preparations and to convince the masses will require some tooling and examples. Especially tooling. The ability to produce rich developer experience is the determinant of many successful technologies. Another crucial factor are real-life uses cases solved by the technology in question. I would like to focus on the former.

As much as the industry has bought into lightweight Web APIs, often inappropriately called RESTful, there has been an uphill battle to have real hypermedia gain traction.

Why hasn’t hypermedia gone mainstream?

I’m still not sure what are the main factors which contribute to the slow adoption of real, unadulterated hypermedia. It seems that a lot of people find hypermedia hard. Just look at all those question on StackOverflow. There are also a number of proponents of pragmatic REST. In my opinion that mostly means throwing the baby out with bath water. Pragmatic approach to REST is seen everywhere.

At the worse end there are for example REST documentation and flawed methods of API versioning. To my despair it seems that too many supporters of such practices completely neglect hypertext and best practices around URIs and links.

A slightly brighter shade of pragmatic REST are the various media types, which actually do put the emphasis on runtime discoverability. This is not something I will disagree with. Not every API is made equal and not every media type needs all the features necessary for a complete hypertext-driven interaction. With links to begin with (think HAL), through forms (supported by Collection+JSON for example) all the way to rich (SIREN or NARWHL) and extensible (Hydra Core) hypermedia.

An optimistic person could envision a proliferation of cool media types and servers using them. Is this so far from the truth! I think that there are still a number of puzzles missing which hinders adoption of proper hypermedia.

The labours of hypermedia

Hypermedia has still a long way to go. To make it happen for real there has to be an active community which understands its benefits and will produce all the necessary moving parts.

  1. We must raise awareness of the benefits of hypermedia
  2. We must define best practices around the shady parts of REST such as versioning
  3. We need powerful and extensible media types
  4. We must create the tooling around these media types for both server and client side
  5. We need a new paradigm for creating adaptive user interfaces both of autonomous and bespoke clients

In future posts I will try to address these labours and show some of my recipes for actual hypermedia-ness.