Chapter 5. Hypermedia Services
EMBRACING HTTP AS AN APPLICATION PROTOCOL puts the Web at the heart of distributed systems development. But thatâs just a start. In this chapter, we will go further, building RESTful services that use hypermedia to model state transitions and describe business protocols.
The Hypermedia Tenet
When browsing the Web, weâre used to navigating between pages by clicking links or completing and submitting forms. Although we may not realize it, these interlinked pages describe a protocolâa series of steps we take to achieve a goal, whether thatâs buying books, searching for information, creating a blog post, or even ordering a coffee. This is the very essence of hypermedia: by transiting links between resources, we change the state of an application.
Hypermedia is an everyday part of our online activities, but despite this familiarity, itâs rarely used in computer-to-computer interactions. Although Fieldingâs thesis on REST highlighted its role in networked systems, hypermedia has yet to figure significantly in contemporary enterprise solutions.
Hypermedia As the Engine of Application State
The phrase hypermedia as the engine of application state, sometimes abbreviated to HATEOAS, was coined to describe a core tenet of the REST architectural style. In this book, we tend to refer to the hypermedia tenet or just hypermedia. Put simply, the tenet says that hypermedia systems transform application state.
Note
What is application state? If we think of an ...
Get REST in Practice now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.