Earlier quoted context omitted.
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.
[dead]
Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
181–190 of 216 posts
Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#182Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#183Earlier quoted context omitted.
> 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.
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.
Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#184Earlier quoted context omitted.
So you drink weak coffee and insist on server-side rendering in 2026?
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.
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!
Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#185Earlier quoted context omitted.
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!
> 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…
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:
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.
Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#186Earlier quoted context omitted.
The things work, albeit with a full page load. As one of the ancestor comments said: progressive enhancement.
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.
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.
Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#187Earlier quoted context omitted.
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.
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,…
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"
Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#188Earlier quoted context omitted.
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.
JavaScript ?
Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#189Earlier quoted context omitted.
> 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…
> 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: When people complain about this stuff, they just reveal they…
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.
Re: Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy
#190Earlier quoted context omitted.
I'm replacing existing third-party applications which have complex JavaScript frameworks with my "in house" apps using HTMX + mostly just HTML+CSS for most pages and functionality. i.e. I'm not introducing a layer, I'm replacing one. Why not just use html without HTMX you ask? With HTMX I don't have to reload the entire page to navigate, which is especially helpful for making the app responsive even on low bandwidth…
You said you added a new Go templating layer.