by karmarepellent · 2y ago · 0 comments
Could it just be an organizational problem? When you start using HTMX in your company your neat distinction between frontend and backend devs collapses and everyone suddenly must be a full-stack developer. When you can avoid that additional cost by simply continuing to use React (or others), why wouldn't you?
Edit: As a side note, I have never used any large JS framework, only HTMX. Just trying to put myself in the shoes of happy React users and such.
At least where I worked there was often a frontend vs backend divide where some devs would write backend logic, and some others would worry only about consuming backend APIs to get the UI to do certain thing. The APIs is the contract and interface between the two sides and a natural place to divide responsibilities.
Now, with HTMX, the divide is gone. The backend generates and swaps the parts of the UI, effectively driving the UI/UX directly. This cuts tons of JS out of the picture and couples (not necessarily in a bad way) backend and frontend.
If you look at a popular YT video: https://www.youtube.com/watch?v=3GObi93tjZI , the result of HTMX rewrite was "JS guy left".
So in larger teams switching from something like React to HTMX largely turns everything upside down, not just on technical level but on how people work and collaborate.
It would be far easier for new teams and projects to go HTMX route, where they can start and keep hiring people who are fine in a new model.
I wouldn't touch HTMX with a ten-foot pole :)
It's a somewhat haphazardly defined DSL around magical attributes, their values, and awkward workarounds with somewhat badly specified behaviours (what's `hx-select-oob` exactly?).
There are other projects that do these things better, with less pretentiousness: Phoenix Liveview or Laravel LiveWire, or even Hotwire
I want a banana and you suggest these jungles. Thanks but no thanks, I'd rather try HTMX which is a library not a framework.
htmx generalizes the standard hypermedia controls found in HTML: anchors & forms
this makes it more work to implement some things, but sticks closer to the basic ideas of HTML
and, as always, if nothing magically works, nothing magically breaks
Oh, they are not. They are more powerful, but they use rather simple concepts. Speaking as the user of Phoenix LiveView who even created his own templating library to work with it.
> htmx generalizes the standard hypermedia controls found in HTML: anchors & forms
Those are not "hypermedia controls". As I said elsewhere: stop appropriating concepts for your benefit.
> the basic ideas of HTML
The "basic idea of HTML" is "render a text page with a few images in one rendering pass with links to other such documents". That is it.
You are perhaps referring to the hypertext vision of Sir Tim Berners-Lee, but that is as far removed from HTMX as HTMX is removed from any other concepts it keeps trying to appropriate.
HTMX is a utility lib with a few diffing utilities that does what nearly every other library does, but chose the high ground of "we're doing it with HTML chunks, so we're better and this is what the founders envisioned".
You're not better. This is not what founders envisioned.
What would you call links & forms? The W3C seems to agree w/my language:
https://www.w3.org/2019/wot/hypermedia
"This document introduces an ontology for links and forms, the main hypermedia controls in use on the Web."
> The "basic idea of HTML" is "render a text page with a few images in one rendering pass with links to other such documents". That is it.
I don't know about that. What about forms? And script tags. And all the other stuff?
> You're not better. This is not what founders envisioned.
I don't claim to be better, i don't know what that means in this context. I'm trying to generalize what I understand to be hypermedia controls (links & forms) in HTML, in a way that conforms to Roy Fielding's definitions of the uniform interface.
I don't understand the hostility here. htmx isn't perfect or some sort of amazing piece of software, it's a flawed implementation by a flawed human of a perhaps flawed idea of generalizing hypermedia controls. But it's not obviously terrible either: people are having success using it, as a quick cruise around the other comments in this thread would indicate.
Typescript is popular because people don’t use it a lot, and it doesn’t break things.
If you’re introducing something new the bar is incredibly high to be obvious as to why to switch.