…means Hypermedia As The Engine Of Application State, but what does that mean?

Hypermedia means links out to video, images, etc. It think in HATEOAS it also refers to links out to other parts of thigher-levelhe REST API.

Application State probably refers to something the state of a computer program. The state is defined by the current data, and the location of the program instruction counter in the code. Together, they define and all the possible state transitions – where the program steps next.

Engine – probably refers to a computing engine, which is like the idea of a small virtual machine, or an embedded programming language. The idea is to break a program into two distinct parts: an engine that serves as the platform for an application, and additional code to define the operation of the application.

In an HATEOAS compliant REST service, when you retrieve a resource, you also get hypermedia (a list of links). The links define possible state transitions.

If state is also data, not just transitions, where is the data? The data is the object that was retrieved – which is a view of the object on the server.

What’s the “engine”? It’s the hypermedia. The code to run on the engine is the code in the browser.

The programmer in me is asking: what does this code look like?

Leave a Reply