← Back to context

Comment by mikewarot

2 years ago

I googled HTMX, all excited that maybe, just maybe, the browser people got their shit together and came up with a framework we can all live with, something native to the browser with a few new tags, and no other batteries required....

and was disappointed to find it's just a pile of other libraries 8(

htmx is written in vanilla javascript, has zero dependencies and can be included from source in a browser and just works

it doesn't introduce new tags (there are probably enough of those) but it does introduce new attributes that generalize the concept of hypermedia controls like anchors & forms (element, event, request type & placement of response/transclusion)

what do you mean?

Everything is a pile of libraries.

It’s a pile of someone else’s code all the way down.

  • You can also use the web platform straight up without transpilation, build tools, post-css compilation and all that jazz.

    Just vanilla JavaScript, CSS, HTML, some sprinkles of WebComponents. And you can be pretty sure that you won't have to update that for a decade or more, as compatibility won't be broken in browsers.

    Heck, I have vanilla JS projects I wrote 15 years ago that still render and work exactly like how they rendered/worked when I wrote them.

Nothing to be disappointed in here AFAICT, however, it’s shocking that you had to Google HTMX, seeing as it shows up on HN a few times a month at least.

  • I'm guessing the disappointing feeling come from parent saying "Pff, I'm so tired of all these libraries that eventually update their APIs in a breaking way, so now I'm using X" while X is just another library exactly like all the rest, and will surely introduce a breaking change or two down the line.

    • HTMX is not _exactly_ like the rest. It's far simpler than the others, e.g. by not requiring a build step, being pure JS and just having a smaller scope overall. Hot/cold isn't binary.

      One of the contributors to the project wrote about the issue here: https://htmx.org/essays/no-build-step/

    • You're arguing from the abstract point of view, rather than the practical. The point is that it takes an order of magnitude more time to clone, say, a Vue project from three years ago that nobody has touched since then and try to download your dependencies and build on a new machine, as compared to an HTMX project.

      5 replies →