4 ms·
It is an API that you program against when you want to build a client for that API. That client is a browser, the most famous of which are Chrome, Firefox, Safa
by BlackFly 5y ago
It is an API that you program against when you want to build a client for that API. That client is a browser, the most famous of which are Chrome, Firefox, Safari, Edge, Opera, etc.
The HATEOAS constraint is what allows the actual form of (for example) a webshop's checkout to start asking for additional details from one day to the next without me needing to update the client. The Hypermedia is indeed HTML, images, movies, javascript, style files, etc. HTML contains the embedded links to navigate around a webshop, the form controls tell the browser what it needs to POST to a url (and that it needs to POST or PATCH).
To do something like that with a data API, the form the data must be comprehensible a priori and the client must be able to know the form of the data dynmically. This means either a large (or small like the web) registry of types of data that you are limited, or some sort of link + schema that the client can understand. If you build such an API, and I build a client, then my client will also naturally work on anyone else's web application that follows the same constraint. That is, my client will be universal. It turns out that nobody web browsers really want or need a universal client.
If you want to see an example of what that looks like in practice, check out JSON-LD at https://json-ld.org/spec/latest/json-ld/ https://json-ld.org/spec/latest/json-ld/ or other specs like it.