Live data from Hacker News

Why you should choose HTMX for your next web-based side project (2024)

hamy.xyz

21–30 of 81 posts

Re: Why you should choose HTMX for your next web-based side project (2024)

#21
post #14

At what point are we going to say browsers with JS is outdated and painful? Every few months there’s some new framework. I think it stems from the fact that we refuse to change the browser. HTML was nice but all these solutions to make it modern are…ugly. And don’t get me started on JS. I just want an elegant solution that’s intuitive and built for modern applications.

You might be interested in this: https://docs.google.com/document/u/0/d/1peUSMsvFGvqD5yKh3Gpr...

It's by the Flutter team lead talking about how with WASM we can redo the web stack by eschewing HTML, CSS, and JS entirely.

Re: Why you should choose HTMX for your next web-based side project (2024)

#22
post #18

HTMX sets up an underlying network traffic pattern: 1. The user interacts with the page. 2. The page sends a request to the server. 3. The server returns one response to the client, containing HTML, which the client inserts into the page. 4. (Optional) If the response includes references to other resources, like images or fonts, the client makes more requests for these. The consequence of the 'one request, one respon…

so as long as you dont expect to scale, it works? Is the connection atleast long lived?

Re: Why you should choose HTMX for your next web-based side project (2024)

#23
post #18

HTMX sets up an underlying network traffic pattern: 1. The user interacts with the page. 2. The page sends a request to the server. 3. The server returns one response to the client, containing HTML, which the client inserts into the page. 4. (Optional) If the response includes references to other resources, like images or fonts, the client makes more requests for these. The consequence of the 'one request, one respon…

so as long as you dont expect to scale, it works? Is the connection atleast long lived?

Htmx can scale. It's very basic and Htmx isn't the only technology to use that approach.

Re: Why you should choose HTMX for your next web-based side project (2024)

#24
post #18

HTMX sets up an underlying network traffic pattern: 1. The user interacts with the page. 2. The page sends a request to the server. 3. The server returns one response to the client, containing HTML, which the client inserts into the page. 4. (Optional) If the response includes references to other resources, like images or fonts, the client makes more requests for these. The consequence of the 'one request, one respon…

/sarcasm/

Which is so much worse than the current paradigm where we have a client side SPA deciding to do all sorts of state syncing and react hooks and tracking pixels and auto pop ups all doing their own thing all over the place!

/end sarcasm/

I think for a side project, not immediately expecting your front end's first version to not horizontally scale to the moon is ok.

Re: Why you should choose HTMX for your next web-based side project (2024)

#25
post #14

At what point are we going to say browsers with JS is outdated and painful? Every few months there’s some new framework. I think it stems from the fact that we refuse to change the browser. HTML was nice but all these solutions to make it modern are…ugly. And don’t get me started on JS. I just want an elegant solution that’s intuitive and built for modern applications.

You might be interested in this: https://docs.google.com/document/u/0/d/1peUSMsvFGvqD5yKh3Gpr... It's by the Flutter team lead talking about how with WASM we can redo the web stack by eschewing HTML, CSS, and JS entirely.

That is more or less how flutter works on the web, right?

Re: Why you should choose HTMX for your next web-based side project (2024)

#26

Earlier quoted context omitted.

You might be interested in this: https://docs.google.com/document/u/0/d/1peUSMsvFGvqD5yKh3Gpr... It's by the Flutter team lead talking about how with WASM we can redo the web stack by eschewing HTML, CSS, and JS entirely.

That is more or less how flutter works on the web, right?

That is correct.

Re: Why you should choose HTMX for your next web-based side project (2024)

#27
post #16

I got a wave of shudder reading the acronym "HAM stack". Yugh. MEAN, MERN, RERN–once hyped up hot air which now sounds so dated and hackneyed. It's cool to be excited about tech but if your main selling point is building "faster and cheaper", I don't know if picking up a minimalistic framework you know nothing about is faster than just re-using your trusty boilerplate. Be it React or Svelte or whatever. With serverle…

The problem is not the server cost, the problem is maintaining the (multiple) APIs altogether.

Re: Why you should choose HTMX for your next web-based side project (2024)

#28
post #14

At what point are we going to say browsers with JS is outdated and painful? Every few months there’s some new framework. I think it stems from the fact that we refuse to change the browser. HTML was nice but all these solutions to make it modern are…ugly. And don’t get me started on JS. I just want an elegant solution that’s intuitive and built for modern applications.

I’ve been saying for a while now that browsers need something closer to a proper UI toolkit, or at minimum “batteries included” primitives built in for ages now. It’d be a much-needed paving of a desire path that’s been so heavily trodden it’s become a canyon.

The WASM approach holds promise too and is interesting to me for opening up support for non-JS languages, but a built in UI toolkit would bring the advantage of not needing a compiler or toolchain (just like the traditional web) which can be advantageous and lowers the bar for entry.

Re: Why you should choose HTMX for your next web-based side project (2024)

#30
post #23

Earlier quoted context omitted.

so as long as you dont expect to scale, it works? Is the connection atleast long lived?

Htmx can scale. It's very basic and Htmx isn't the only technology to use that approach.

It cannot scale because it doesn't have a solution for reusable components. That's why I have abandoned it. Frameworks like React solve this in a much saner way.
Post reply on HN