4 ms·
It’s basically another framework that lets you add interactivity to server side generated HTML views, ala Stimulus, Knockout, etc. A lot of devs like approache
by gedy 4y ago
It’s basically another framework that lets you add interactivity to server side generated HTML views, ala Stimulus, Knockout, etc.
A lot of devs like approaches like this because they can do more with their server-side language and frameworks that they’re used to/more familiar with, since trying to do everything server-side doesn’t give you the interactivity UX, product, etc wants.
(I personally prefer client side HTML view rendering like React, and only talking to the backend via API calls, but I understand the use case for this sometimes)
- projektfu 4y agoI totally get htmx. Just not hyperscript.
- gedy 4y agoMy bad, yeah I don't see the value-add of that either.
- recursivedoubts 4y agothe idea with hyperscript is to provide a general, event oriented language that can be embedded cleanly directly in HTML normal on* attributes are fine, but they aren't general (e.g. htmx fires a bunch of events you might want to hook into, and you can't use normal on* attributes to cathc them) hyperscript also has a lot of features that are DOM oriented (e.g. query literals like <div.foo/>) certainly not everyone's cup of tea, but it dovetails nicely with htmx and fills a need for a general, event oriented scripting language to complement it
- recursivedoubts 4y agohtmx is a little different in that its focus is on extending HTML as a hypermedium, exchanging html (rather than some other data format) with the server, and staying within the original web network architecture articulated by Roy Fielding: https://htmx.org/essays/spa-alternative/ https://htmx.org/essays/spa-alternative/ https://htmx.org/essays/hateoas/ https://htmx.org/essays/hateoas/