On Thu, Jun 10, 2021 at 4:07 PM Chris Angelico <rosuav@gmail.com> wrote:

What's the advantage of htmx? When I want to build a good interactive
web site, my general pattern is a back end with a well-defined API,
and a front end in JavaScript that makes use of this API. That API is
usually going to be based on either a RESTful (or roughly REST-like)
JSON transactional system, or something like websockets, again
carrying JSON payloads. HTML is the realm of the display, not the back
end.

I use unpoly but the deal is the same: backend HTML rendering lets us leverage all sorts of meta programing, ie. add a field to a form and you don't have to change your presentation layer: the Form instance will automatically render a form field with all the necessary validation, ie. in case of a username field which must be unique in the database.

--