htmx

Oct 20, 2023

previously programming/javascript/HTMX

https://htmx.org/

htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext

The idea as I understand it (i.e. minimally) is that instead of using javascript you can render templated HTML on the server side and send them over the wire where they can be dynamically inserted, creating an SPA-like app with less hassle.

I'm probably misunderstanding though, to research.

via https://edofic.com/posts/2022-01-28-low-js/, though I've seen it before


https://nomadiq.hashnode.dev/reimagining-front-end-web-development-with-htmx-and-hyperscript

In recent years, a few mavericks and renegades have started to turn away from the world of JS frameworks and the inevitable bloated node_modules folders. But what if you want a smooth single-page app experience, rather than waiting for the whole page to render every time you click a button? Of course, nobody wants to write a load of boilerplate JS for every little interaction. This is where hypermedia in the form of htmx and hyperscript come in.


https://htmx.org/essays/hypermedia-driven-applications/

Following the REST notion of architectural constraints, two such constraints characterize the HDA (Hypermedia-Driven Architecture) architecture:

By adopting these two constraints, the HDA architecture stays within the original REST-ful architecture of the web in a way that the SPA architecture does not.

In particular, HDAs continue to use Hypermedia As The Engine of Application State (HATEOAS), whereas most SPAs abandon HATEOAS in favor of a client-side model and data (rather than hypermedia) APIs.

Essay on the proper use, application, and aesthetics of, HDA applications

Has useful code examples

↑ up