3 ms·
The last two sentences are: > While attempts have been made to impose more elaborate hypermedia controls on JSON APIs, broadly the industry has rejected this a
by criddell 5y ago
The last two sentences are:
> While attempts have been made to impose more elaborate hypermedia controls on JSON APIs, broadly the industry has rejected this approach in favor of simpler RPC-style APIs that forego HATEOAS and other elements of the REST-ful architecture.
> This fact is strong evidence for the assertion that a natural hypermedia such as HTML is a practical necessity for building RESTful systems.
This all sounds about right to me and makes me ask what the problem actually is? Maybe an RPC-style API is a better choice for most systems?
- recursivedoubts 5y agoThe success of the web argues that the hypermedia approach is a good choice for a large set of systems. The problem today is that hypermedia development has been stuck in the late-90's/early-00's which, when contrasted with JSON/RPC-based development, is really showing its age, particularly in terms of UX. https://htmx.org https://htmx.org is an attempt to rectify that situation and get hypermedia-style development back in the game as a viable, modern network architecture for more than just content-oriented web sites.
- criddell 5y agoI was looking at that site a bit earlier today and I guess I still don't understand the motivation. On the "Htmx in a Nutshell" page you say: > This keeps you firmly within the original web programming model, using Hypertext As The Engine Of Application State without even needing to really understand that concept. Why is the original web programming model worth consideration? Why choose a RESTful API over a more RPC-like API?
- recursivedoubts 5y agoSome reasons you might want to use hypermedia over an RPC-like API: - The simplicity of the model (e.g. The "active search" pattern can be implemented with a few hypermedia attributes in htmx: https://htmx.org/examples/active-search/ https://htmx.org/examples/active-search/) - The flexibility of the uniform interface[1] (e.g. versioning your API is much less of a concern) - The ease of deep linking