3 ms·
The hypermedia API option really doesn’t add much flexibility, when consumed by client code (as opposed to a human, or possibly by ChatGPT). It allows changing
by layer8 4y ago
The hypermedia API option really doesn’t add much flexibility, when consumed by client code (as opposed to a human, or possibly by ChatGPT). It allows changing the URLs, but it doesn’t allow changing the structure or naming or semantics of the API. Arguably the only benefit it affords is being able to transparently move linked resources (such as subresources) between hosts, and that’s usually a case of YAGNI.
- hermanradtke 4y agoThe hypermedia response is not intended to be a bag of data that the client parses and transforms into a view. The HTML response is the view. This is how the basic web works. The browser (as a client) knows how to render HTML. HTML also provides affordances (links and forms) to transition state. Htmx has similar behavior to the basic web. Their client adds additional affordances to HTML and they allow state transition within the page. People may disagree with this approach but to say it is not flexible seems odd when browsers are the most flexible hypermedia client in existence.