blister
2 days ago
I've been using htmx for three years now, and it's completely unlocked new ways of building software for the web, especially if you use a server-side templating language.
But more importantly (as this "Game Boy" option reveals), the head honcho is really responsive with the items in the store. I had purchased a coffee mug a few years back and complained on Twitter that they need to sell larger mugs instead of only offering little tiny baby mugs that only hold ~8 ounces of liquid. The next day, he added giant 48-ounce monsters to the store and I've been drinking out of that mug every day since.
Grimblewald
2 days ago
It's been massive for me as well. I would say my web developmemt is best described as dabbling in web development, and I mostly do so for websites that cater to academic interests and conference / society managment and organising. So, relativly niche.
However, I think HTMX is a beauty. Fast, simple, and doesnt come with all the bloat and BS a JS heavy / JS first deployment comes with. I can quikckly build fast and responsive sites that cost visitors very little to use/interact with.
websites have less compatability issues now, load extremely fast (google web speed score from 60-80 to flat 100), and have fewer points of failure. Debugging is a breeze. Websites are no less pretty or useful for it. In fact, they look better now because time otherwise wasted on Js BS is now free to use to tinker with / improve aesthetic, or add new features.
I'm in love with HTMX. It feels like what the web should have always been. There's absolutly zero reason a random website, without my knowledge or consent, should be running extremely heavy compute and analytics on my own device. That should never have been possible/permissible in the first place.
robertoandred
2 days ago
HTMX is just as JS compute heavy. It's not magic.
yawaramin
2 days ago
How is htmx ‘just as JS compute heavy’? It’s doing way less than your average SPA. Have you seen the sizes of the JS bundles of popular SPAs? They make htmx look microscopic in comparison.
troupo
2 days ago
It's a 14kb library that invents its own templating syntax and DSL and also requires the backend to conform to its DSL.
Yes, it's smaller than some other frameworks, but let's stop with "doesn't require JS" nd other bullshit
yawaramin
a day ago
It doesn’t have its own templating syntax, it just uses server side HTML generation. It doesn’t require the backend to ‘conform’ to anything, it works with very standard HTTP forms and HTML responses. I’m afraid you’re very confused!
troupo
a day ago
> It doesn’t have its own templating syntax
What do you think hx-get and hx-trigger="input changed delay:1s" are? Standard browser attributes? Standard browser functionality and behaviour? Standard events syntax?
> It doesn’t require the backend to ‘conform’ to anything,
Just one of the quotes from the docs: "You would need to check on the server side for the HX-Request header to differentiate between an htmx-driven and a regular request, to determine exactly what to render to the client."
> I’m afraid you’re very confused!
I'm afraid I'm not
yawaramin
a day ago
> What do you think hx-get and hx-trigger
Hx-attributes are not a new ‘templating syntax’, they’re custom attributes with a simple DSL for describing triggers and swaps. You can prefix them with ‘data-‘ if you want and they will be 100% standards-conformant. HTML itself is full of these little in-attribute DSLs–look up the standard ‘autocomplete’ attribute:
<textarea autocomplete="shipping street-address"></textarea>
When people complain about this stuff, they just reveal they don’t know HTML.> …from the docs: "You would need to check on the server side for the HX-Request header…
Yes, this is how HTTP content negotiation works. The client sends headers to the server describing what it wants and the server sends headers describing what it gives. I hope you’re not suggesting that htmx invented this technique. It’s kinda funny to suggest that htmx forces servers to ‘conform’ to something when most of today’s JS frameworks do server-side rendering only on JavaScript server runtimes.
troupo
a day ago
> Hx-attributes are not a new ‘templating syntax’,
They are. If you look at how they are processed by HTMX itself.
> they’re custom attributes with a simple DSL
At least you agree that it's a custom DSL
> You can prefix them with ‘data-‘ if you want and they will be 100% standards-conformant.
It doesn't matter if they are "standards compliant". The browser has literally no idea what they are, and what that DSL is. HTMX parses them, parses the DSL etc.
Turn off Javascript and whatch how this beautiful standard-compliant stuff turns inert (or doesn't even load).
> Yes, this is how HTTP content negotiation works. The client sends headers to the server describing what it wants
That's not how content negotiation works. Standard content negotiation does not require custom headers, or the client needing to parse this header and be aware of anything to differentiate requests.
There's are literal Content-Type and Accept standard headers. And yet HTMX invents its own flavor.
> most of today’s JS frameworks do server-side rendering only on JavaScript server runtimes.
Most of which AFAIR don't require custom headers.
yawaramin
a day ago
You must be joking, React Flight Protocol for RSC is literally a new RPC system that comes with its own set of brand-new vulnerabilities. But sure, adding a couple of HTTP headers, which were designed for exactly this kind of use case (adding metadata to requests and responses), is a bridge too far.
troupo
a day ago
Because 1) React is the only framework out there and b) that somehow absolves HTMX or makes anything I said untrue
yawaramin
10 hours ago
Ok, take a look at the other popular frontend frameworks out there and tell me with a straight face that they don’t have their own mini-DSLs:
https://docs.solidjs.com/concepts/control-flow/conditional-r...
https://vuejs.org/guide/essentials/template-syntax.html
https://angular.dev/guide/templates#differences-from-standar...
None of which work with JavaScript turned off (unless you have a JavaScript backend and you wire it up to serve HTML).
The criticisms I’m seeing here are all things that are accepted without question in other frameworks but when htmx does it, suddenly it’s too much.
troupo
6 hours ago
> The criticisms I’m seeing here are all things that are accepted without question
Who said they are accepted without question?
> when htmx does it, suddenly it’s too much.
No, when HTMX and its proponents claim things that are objectively provably false, it's too much.
Me: HTMX requires the server to be compliant with its DSL to work properly
You: no it doesn't. It's literally how content negotiation works! <Thus admitting HTMX requires server to conform to HTMX to work properly>
Me: there are literal standard headers for content negotiation
You: but what about React, and other frameworks.
Are we talking about React? Or other frameworks? We are talking about HTMx and your and others' claims about it.
Me: HTMX is custom templates and custom DSL.
You: no it's not!
Me: yes, it is
Me: It's standards compliant custom attributes and custom DSL. Why don't you look at all these other frameworks.
At every step of your "argument" you keep confirming every word I'm saying while somehow presenting it as an argument.
Try to actually learn something about tech you so fervently defend and to see how uour claims rarely differ from marketing bullshit (that marketing bullshit is often peddled by HTMx itself, most other frameworks are much more honest).
At this point I'm tired of pointless arguing with reality-denying people.
Adieu.
yawaramin
3 hours ago
Htmx functions fine with any standard HTTP server in basic cases: it’s just an HTTP request and response with an HTML fragment. For progressive enhancement cases you can follow a very simple strategy of checking the HX-Request header and rendering either a full page or a partial, and adding a Vary: HX-Request response header. There’s no material difference between this and the standard content negotiation we talked about. To the server this is the same logic with just different names.
Also I pointed out that HTML already has custom DSLs in many of its attributes, this is not some new thing that htmx invented.
Finally, it says directly on the htmx landing page that it uses attributes for its functionality, and directly shows examples of common ones. This is right on the landing page. You have to dig into the special syntaxes of the other frameworks I mentioned to understand the differences they introduce. So I firmly refute your claims of marketing bullshit and dishonesty :-)
Try re-examining your own biases, you are in strong reality-warping mode :-)
tailscaler2026
a day ago
That's how progressive enhancement works. The website should work fine if JS is disabled. Then it's faster via htmx if JS is enabled, and more so if the backend is tuned as well.
troupo
a day ago
None of the things HTMX adds will work. Which is easy to test by just turning off Javascript on most (any?) examples or sites using HTMX.
Because none of that is standard, none of that is understood by browsers, and requires HTMX to work.
Which is also besides the point of discussing whether or not HTMX invents its own templating, DSL, and requires the server to be aware of HTMX to to work properly.
zamalek
a day ago
The things work, albeit with a full page load. As one of the ancestor comments said: progressive enhancement.
troupo
a day ago
Lol. Even the hamburger menu doesn't work on htmx.org without Javascript.
I'll let you find any working examples yourself.
Most sites won't work or will be broken, too. Obviously You have to actually try and work on progressive enhancement, and not rely on marketing blurbs and promises of magic.
I wonder if people blindly defenfing their favorite thingd actually know anything about them.
yawaramin
a day ago
Hamburger menu on the htmx.org site using JavaScript has nothing to do with htmx the framework itself, they’re completely unrelated. It wouldn’t be difficult to make the hamburger menu work without any JS by just using the Popover API, which again is completely unrelated to htmx and can be used by any frontend framework.
I assure you I know quite a bit more than you when it comes to htmx and progressive enhancement, having built multiple progressively enhanced htmx apps that work almost exactly the same without JS.
troupo
a day ago
> Hamburger menu on the htmx.org site using JavaScript has nothing to do with htmx the framework itself, they’re completely unrelated.
Yup, the unworking hamburger menu on the website preaching about progressive enhancement and built entirely with this framework "has nothing to do with htmx".
All examples on HTMX site that we're told will just work "with full page reload" and that don't work also have nothing to do with HTMX.
HTMX is magical progressive enhancement "The things work, albeit with a full page load" somehow are broken on HTMX site itself and on most sites built with it, but all this also has nothing to do with it. Because "things just work"
yawaramin
a day ago
The htmx website is full of demos showing how htmx works. Htmx is a JavaScript framework. Unsurprisingly, some of these demos don’t work when JavaScript is turned off. This thread is getting absurd now.
troupo
a day ago
A reminder. I was told things just work: https://news.ycombinator.com/item?id=49071380
And now you're repeating what I already said and somehow pretending it's an argument with something I didn't say.
yawaramin
10 hours ago
No, you were told ‘the things work’, with progressive enhancement. Like many frontend things, progressive enhancement isn’t automatic with htmx. But it’s relatively easy and best of all works with any web server, not just JavaScript backends. Your criticism is basically that it’s not perfect, so it’s worthless. No, it works great for many use cases. And your judgement is clouded by your biases.
troupo
6 hours ago
Let's see the fuller context:
>> Which is also besides the point of discussing whether or not HTMX invents its own templating, DSL, and requires the server to be aware of HTMX to to work properly. reply
> The things work, albeit with a full page load. As one of the ancestor comments said: progressive enhancement.
Oh. It turns out things don't work, neither on HTMX's own site, nor on most sites built with it.
Why do you keep arguing theory when reality is right there for anyone to see?
> Your criticism is basically that it’s not perfect, so it’s worthless.
No. My criticism is that HtMX authors and proponents keep presenting HTMX as something it objectively isn't despite actual verifiable reality.
I literally said what I mean in my first comment which started this pointless thread.
As I said in a sibling comment:
At this point I'm tired of pointless arguing with reality-denying people. Adieu.
yawaramin
3 hours ago
You inferred ‘reality’ by looking at examples that agree with your argument and ignoring ones that don’t. This is not theory, we have actually built this stuff. We’ve been telling you this over and over again. A couple of hand-picked counter-examples doesn’t change that.
Good luck with your confirmation bias fallacies though.
tailscaler2026
a day ago
[dead]
dang
a day ago
It's not ok to post like this here. Since it isn't the first time you've broken the rules like this, I've banned this account.
jdiaz97
2 days ago
yeah if that's a problem you can always use fixi https://github.com/bigskysoftware/fixi
troupo
a day ago
What does that have to do with anything? Literally the same thing (only difference is size)
rolymath
2 days ago
You're saying we need magic for different js frameworks to have different performance profiles?
stevoski
2 days ago
> I've been using htmx for three years now, and it's completely unlocked new ways of building software for the web, especially if you use a server-side templating language.
Likewise. 3 or 4 years ago, I ripped out two-thirds of all the JS in my B2B SaaS by using htmx with server-side templating. So much simpler.
The ethos of allowing a return to a simpler way of building a web app resonates with me.
sevenzero
2 days ago
This should be the way. For some reason, over time, it became harder and harder to build web apps. Tech should be about making things easier though. I don't know where we went wrong.
albuic
a day ago
JavaScript ?
sevenzero
a day ago
Nah vanilla Javascript is fine as it was built to make stuff more interactive on the frontend side, which it works great for.
albuic
a day ago
I don't agree. JavaScript was definitly not fine when it started and because of it, people had to create multiple libraries and framework to go around differences in web-browsers. They got used to libraries and big framework as they really were necessary first. Now that JavaScript is pretty good, they are still used to frameworks and libraries which are very often unnecessary.
addaon
2 days ago
> The next day, he added giant 48-ounce monsters to the store and I've been drinking out of that mug every day since.
This was my trick for cutting back to two cups of coffee a day.
hi_hi
2 days ago
> it's completely unlocked new ways of building software for the web, especially if you use a server-side templating language.
Could you please expand on this point. As a “greybeard” web dev from the 2000’s era, I’d like to understand if your “unlocking” is my “that’s how it originally worked, get of my lawn”?
masfoobar
2 days ago
Yes - how you likely built websites in 2000's era (possibly with Classic ASP or PHP4 .. maybe Perl?) is the sort of websites we are addressing with HTMX.
It's bringing us back to that sort of web development but with modern tools and technology.
For the server side, we can use modern languages with better templating for html.
For the client, with htmx, you can do a lot of javascript such as ajax calls (load, trigger, etc) without writing javascript. With htmx you specify what you want to do inside html attributes.
So my actual javascript code ends up minimal.
I have been doing website dev since 2008. I've worked with PHP, C# (WebForms, MVC), a bit of python... not to mention maintaining an old website in Classic ASP.
2008-2010 I used C# WebForms. I didn't like it, but we still kept it simple, returning data from server side to html.
2010 I started to enjoy jQuery and saw potential returning data. Opened the door to provide more options for webdev.
Around 2014, I've started disagreeing with "modern website development" learning knockoutjs, requirejs, to eventually angularjs, npm's, etc. Sure, I learned and pushed forward but websites seemed to become more a chore and bloat overtime. Personally, I've not really invested in React.
I was starting to go round full circle to the 'old ways' just with modern tech. To me, htmx just makes webdev even more smoother.
tracker1
7 hours ago
FWIW, there is some decent tooling options for C# with Razor + HTMX that are worth looking at. From JetBrains and others.
aktau
2 days ago
I have the same question. It seems like a decent amount of posters here don't require (non-standard) interactivity. Plain HTML+CSS (perhaps via static site generators) would work.
It made me think about the Javascript present on my blog. The site works fine without JS (syntax high-lighting is pre-baked server-side).
There is some optional JS enhancement:
- MathJax is used for turning LaTeX expressions into nice graphics on the client-side. A search reveals this could be done on the server-side, but I'd need to deal with the node.js ecosystem.
- PJAX is enabled [1]. This is completely optional, but it noticeably made page navigation faster (feel instant), especially when navigating between pages already visited (forwards/backwards).
UPDATE: Reading https://triptychproject.org/, it seems like what PJAX does is item #3: "Partial page replacement"[1]: The library is at https://www.aktau.be/js/pjax-standalone.js. It is invoked at the end of <body>:
pjax.connect({
"container": "content",
"complete": function() { MathJax.typesetPromise(); }, // Reload mathjax after a pjax load.
"autoAnalytics": false
});sgt
2 days ago
Exactly, I just released another project made with htmx and it's almost like you can't beat that velocity.
mlhpdx
2 days ago
Likewise, I started using HTMX with AWS Step Functions as the backend and it’s been difficult but also a joy. Sfn these days makes for a weird and wild text templating engine. I’ve been thinking about working on DSL overlay to smooth the bumps a bit.
_jackdk_
2 days ago
That is not a use cases I would've expected Step Functions to handle; I'm intrigued. You're using express ones, I assume, but how are you wiring them up and why?
mlhpdx
2 days ago
API Gateway direct integration to Step Functions. Unlike Lambda, there is not automatic transform for requests so I just wrote one and copy/paste it to each method integration (via a preprocess script; one of the ugly bits). Yes, EXPRESS state machines. I’ve found they have better tail latency behavior, and of course they involve zero patching/dependency updates which is nice.
The state machines use JSONata for the sweet, sweet power vs JSONPath. Generally I have a Parallel state that splits the different parts of the page and Map states for data driven repetition (usually some data pulled from DDB). I have a simple JSONata method for replacing placeholder values (aka data binding). Zero Lambda at the cost of come copy paste.
I’m not unhappy with it despite the warts.
_jackdk_
2 days ago
Thanks for replying, that's an interesting architecture. The idea of using a high-up parallel state seems particularly neat as a way to ensure every part of the page render stays independent, and to burst up the compute serving the response.
orphereus
2 days ago
Sorry, but at that size (1.25 liters) for my European brain, it's not a mug anymore, it's a barrel.
TeMPOraL
2 days ago
Right. People look at me funny for drinking my tea from a 500 ml thermal mug, courtesy of USS Defiant replicators, and it's not because of the Starfleet delta on it (people don't even recognize it, philistines).
1.25 liters is way beyond even my own addiction to lightweight liquid stimulants.
crote
2 days ago
I think the legal term is a "heart attack".
walthamstow
2 days ago
It's more than double the size of a Sports Direct mug, which is about the largest cup of tea a Briton would consider
germandiago
a day ago
Please I am all ears.
I have right now a landing page and a NiceGUI dashboard with websockets (but only need SSE, though I need charts).
I am all the time looking at htmx and used to "desktop-like" workflows for UI authoring.
So I went with NiceGUI. But I wonder if or what tasks I could sinolify. My sites are low/middle-traffic.
I do not need any API backend at all, just final user presentation.
scumdude
2 days ago
Tell me about it. I made a joke about the store selling 'Complexity Bad' onesies, and he started selling them later that day.
inigyou
2 days ago
This implies it's all dropshipped print-on-demand, of course. Which is fine if you're just considering it a donation incentive rather than a worthwhile product in its own right.
cure_42
2 days ago
Yeah I had the same thought. I was vaguely interested before, but I have no desire to own more garbage
randallsquared
2 days ago
To be clear, making clothing is not actually their business.
inigyou
a day ago
Yes, but you might guess they've done some work to find a supplier and test the quality of their supplied products and have a box of T-shirts they know are good. Which they don't - they're basically just plugging your order into a slop fulfilment company. Which is fine if you don't actually care too much about the merch.
Induane
2 days ago
That's amazing!
sublinear
2 days ago
So you drink weak coffee and insist on server-side rendering in 2026?
evenhash
2 days ago
In 2026, everything is server side. Serve your DOM updates encoded in JSON if you want. Personally, I find serving them in HTML to be less of a hassle.
SpaceNoodled
2 days ago
The server SHOULD do the rendering. It's a SERVER, not a give-me-a-bunch-of-bloated-junk-and-make-me-do-it-myself-er.
KronisLV
a day ago
I mean a radically different view is that the SERVER should just give you the data and process your requests, without necessarily caring much about what you are - a browser or some other automated system, or a desktop client, where each has vastly different preferences on how the content might get displayed or used.
With that approach, a clear API in the middle and a SPA on the client side makes a bunch of sense (as long as you don't make some chimera of hydration and pre-rendering and server-side components while pretending that it's still a SPA and it "just works" while your server is coupled to the client).
Of course, what you actually need depends on your circumstances and sometimes even preferences. For a bunch of internal or personal stuff, SSR can be really nice and simple!
andy800
9 hours ago
You're correct that it's a matter of the developer's view, or philosophy. The issue I have with "just give you the data" is that requires the server to encode the raw data somehow, most often JSON, send it down the wire just to have the client un-encode it, store it, and populate HTML elements with it. Meanwhile server-based templating is exceptionally lightweight and fast (especially when compiled) and so converting the raw data directly to HTML on the server via templates tends to be faster and lighter and cleaner, as "state" (not counting ephemeral or stylistic attributes) is maintained in a single place.
You make a good point that different clients may represent the data differently, although again that's easy to handle on the server by using a header or other identifier of the client, and using the appropriate template.
There isnt a definitive right or wrong, both approaches can work but the reason HTMX has found a following is that lots of developers are tired of the complications and difficulties that SPA frameworks seem to introduce, and reverting back to a server-based philosophy is allowing them to be more productive.