pull down to refresh
100 sats \ 14 replies \ @rblb 14 May \ parent \ on: Just fucking use HTML devs
htmlx is a javascript framework
It's an "un-framework", in that beautiful middle spot between HTML and convoluted shit like Next... the DX is completely different
reply
reply
So? The point is that I didn't have to write a ton of Javascript that renders HTML myself, HTMX is only adding attributes to HTML, and it's not a "bloated, overengineered mess."
Working with HTMX is completely different from other JavaScript frameworks, so saying HTMX is a Javascript framework isn't appropriate imo.
reply
No, it is not adding attributes... all custom tags and attributes are valid in html, they just do nothing by default... HTMX is calling a ton of querySelectorAll to select its own custom tag and then run javascript on them.
This is very inefficient and bloated, you can just write html and use plain javascript querySelector for the elements you need, this is what htmx does, it just does it for a lot of stuff you don't need.
reply
Please explain how the inefficiencies and bloat you see in HTMX actually matter. Do they significantly slow down the site or make HTMX too complicated to use?
But to entertain your argument: it's 1,604 lines of code in a single file 1 with zero dependencies. If there's something you don't need, you could just remove that code yourself. That's how simple it is. Try doing that with a common JS framework like React, Vue, or Angular.
Footnotes
-
How much "bloat" can there be in less than 2,000 lines? ↩
reply
Unpkg cuts the code at 1600 lines, the full source is actually 5000+ lines.
There is no point in judging quality and efficiency by counting the lines of code... a 10 line code can be slower and more inefficient than a 1000 lines code, what matters is what the code does.
React, vue and angular are also zero dependency. There is also a lightweight version of vue .
It looks like you sing praises to htmx only because it is a less known outsider than the other frameworks that everyone uses, but it is really no different, and you often don't need a js framework. That's my point.
reply
It looks like you sing praises to htmx only because it is a less known outsider than the other frameworks that everyone uses, but it is really no different
Wow, I'm wasting my time replying to you. You now write this and you didn't even explain why what you said before matters:
Please explain how the inefficiencies and bloat you see in HTMX actually matter. Do they significantly slow down the site or make HTMX too complicated to use?
I will just refer you to #980353.
reply
I will just refer you to #980353.
Seen it already and zapped.
I'm replying to you because you reply aggressively and insist in trying to make htmx pass as something that is in topic with the op ( "Plain, unadulterated HTML") when it is not, it is just a framework and the underlying tech is the same.
If vue is slow, htmx is at best as slow, that's a matter of fact, no amount of pretending to be on a high horse will change that.
See the problem is that i explain what i say, you just are not willing to think about it.
Jumping into the dom with querySelectorAll on the whole page to extract tags to use them again to fire javascript functions is inefficient. It will slow down your page if it has enough data in it.
It won't slow down your website, because it is simple, you could write it with the slowest framework in the world and it will work just fine.
Also the reason why websites are slow, has usually nothing to do with the framework in my experience, but with the devs that are proficient in using the framework, but don't know javascript very well and get caught in anti-patterns that make their code unmaintainable and inefficient.
somebody should share this convincing the HTMX Twitter account... in sure it would be very appreciated
reply
reply
apologies.. late nite swypo.
s/convincing/conversation
reply
reply