He talked about this idea quite a bit, I love the idea of giving backend developers more control over the UI without resorting to huge JS frameworks
Is htmx Just Another JavaScript Framework?
31–40 of 318 posts
Re: Is htmx Just Another JavaScript Framework?
#32It is not the same at all. Of course it needs javascript on the back to work. But the concept is totally different. It uses a hypermedia declarative model, an extended POST/GET etc. model. It keeps things very simple compared to a framework like React where you need a package manager, a transpiler and a json backend for data (not returning hypermedia). So I would not consider it another Javascript frontend framework…
I just had this weird flashback to Frontpage...
Re: Is htmx Just Another JavaScript Framework?
#33> But you can write React in this library-like manner too and nobody argues that React isn’t a framework. I think people do still make this argument
Re: Is htmx Just Another JavaScript Framework?
#34I prefer to refer to htmx as a "future polyfill". Eventually, htmx semantics will become part of the web standard, and older browsers (or those that choose not to implement the feature) will need this polyfill.
Why do you think that will be the case?
I'm not aware of any effort being made to evolve htmx into a web standard (either by introduction into existing specifications or direct adoption by browser), so this is about as baseless of a claim as someone saying "I see JQuery as a future polyfill" in ~2006.
Re: Is htmx Just Another JavaScript Framework?
#35"a system by which elements enter and exit the DOM via network request."
Re: Is htmx Just Another JavaScript Framework?
#36I prefer to refer to htmx as a "future polyfill". Eventually, htmx semantics will become part of the web standard, and older browsers (or those that choose not to implement the feature) will need this polyfill.
Apart from that, I'm not sure if I even agree with the point as a metaphor.
Some parts of htmx would make it easier to implement a form submit confirmation message or similar stuff.
everything else is either better served fully server-side or needs heavier client JS.
E.g. ajax pagination is useless without routing... well maybe I need to try htmx more thorougly to understand this stance. right now I don't.
it's not hard to do a fetch request and set innerHTML on an element, right?
Re: Is htmx Just Another JavaScript Framework?
#37Like any library, it has a bunch of functions available to use. The difference, however, is that you don't use them directly. You are just writing html with htmx tags, etc.. and letting htmx, the library, do the rest.
This is it for the most part - but I understand some complications could break that rule. I doubt it would be that often if at all.
Re: Is htmx Just Another JavaScript Framework?
#38So what's the problem with a bundler/transpiler etc? You set it up once. It takes a few hours, maybe a day. Then your platform _is_ TypeScript + React. This abstraction basically never leaks. I never need to look at the transpiled files to find an error. Nobody argues that a C compiler is worse than assembly or that drivers or an operating system are bad.
> You set it up once. It takes a few hours, maybe a day. Until you need to update a dependency on a large codebase, which takes weeks because dependency A doesn't work with dependency B version X, and updating dependency B means that it no longer works with dependency C version Y, and so on. And nobody uses dependency C anymore -- it's unmaintained, so you need to rewrite everything to use dependency D. Then you need…
Re: Is htmx Just Another JavaScript Framework?
#39htmx is one of those things, like SQLite on the server, that you will incessantly see on HN, but rarely see used at large profitable companies. Say you use python and Django. Why use htmx instead of Django templates? Same with ruby and rails, elixir and phoenix, etc. the trend is clearly towards live view/hotwire OR things like server side react. Htmx is in a weird position that makes no sense unless you want to use…
Re: Is htmx Just Another JavaScript Framework?
#40Haven't heard of htmx before, but I might use it on a future project if I remember. As somebody who is not a frontend engineer, but still likes to make a website every now and then. I haven't found a full framework (vue, react, etc.) that I've been able to go full into and still use jquery and writing plain css/html. Htmx looks like a slight feature upgrade to jquery that I enjoy.
That’s basically where it lives, though it expects your backend to return html chunks iirc