2 ms·
You can use progressive enhancement approaches with htmx, the hx-boost attribute is an example, if you like. The active search demo: https://htmx.org/examples
by recursivedoubts 6y ago
You can use progressive enhancement approaches with htmx, the hx-boost attribute is an example, if you like.
The active search demo:
https://htmx.org/examples/active-search/ https://htmx.org/examples/active-search/
is another example that can degrade gracefully in the absence of javascript: wrap the input in a form and do the normal post-back for non-JS enabled clients.
With respect to REST & HATEOAS, note the first term in HATEOAS: Hypermedia as the Engine of Application State. HTML is the hypermedia that Fielding was describing in his dissertation. (XML and JSON are not hypermedias, so I'm not sure what you are getting at with that as a comparisong)
htmx tries to use HTML (a hypermedia) as the data interchange, thereby respecting the uniform interface of the original web model. No side state, no interpretation, no special knowledge: just exchanging hypermedia with a server. This is in keeping with the network model Fielding was describing in a way that a React client, for example, is not.
htmx tries to extend and complete HTML along the lines it was already going, before it stalled. Yes, it uses the tools available to do so, which are javascript, unfortunately.