I recently found Datastar [0], another hypermedia project. It was originally inspired by htmx, but they are fully on their own (hypermedia) course. According to the devs, who had a bunch of discussions with maintainers of htmx, the htmx project considers itself finished and no new features forthcoming. It is laudible, a project considering itself complete. Datastar considers its library v1.0 release [1] to be complet…
Why you should choose HTMX for your next web-based side project (2024)
51–60 of 81 posts
Re: Why you should choose HTMX for your next web-based side project (2024)
#52At 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.
But then microsoft took everything and ran with it. And now people believe typescript is good because their text editor lies to them.
Re: Why you should choose HTMX for your next web-based side project (2024)
#53Earlier 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?
name one thing using "flutter web".
Flutter is just the thing startups use until they can hire a dedicated IOS person and fork the "app" codebase.
Re: Why you should choose HTMX for your next web-based side project (2024)
#54Earlier quoted context omitted.
But why?
I guess I could see it for decoupling your need to control the API you're using. The case where you have an existing API, whether your own or someone else's, and just want to get a new frontend hooked up to it.
Htmx is "bring your own backend", but you do have to have a backend, be it Haskell or Zig or Gleam, that talks to your API, and renders HTML.
Re: Why you should choose HTMX for your next web-based side project (2024)
#55I 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…
That's the whole point of HTMX: Going back to what works: trusty old HTML attributes, but giving them intuitive interactions.
Instead of learning the microframework du jour, you just add some attributes into your HTML templates, and get your desired result.
Re: Why you should choose HTMX for your next web-based side project (2024)
#56Earlier quoted context omitted.
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.
Reusable components are prerogative of the templating system, such as React, or Vue, or server side templates that the framework of your choice uses. Htmx works with already rendered HTML fragments from the back end and doesn't do templating on its own, so there's simply no room for it to "solve" reusable components
Re: Why you should choose HTMX for your next web-based side project (2024)
#57Earlier quoted context omitted.
> But they're still too new and unproven for the React-embroiled companies to switch just yet. I've seen a few of HTMX projects attempted in production, at my previous employer. Decently sized, moderately complex web products for serious commercial purposes I will say though, all three were complete disasters.
Nothing magic about htmx or hypermedia: you still need to organize your code properly, and there are tasks for which it is not suited: https://htmx.org/essays/when-to-use-hypermedia/ However, in many case, it can be much simpler architecture than alternative approaches: https://htmx.org/essays/a-real-world-react-to-htmx-port/
It is truly refreshing to see how simple web development can be when using htmx instead of a full spa framework.
I do full stack (angular, aspnet core, mssql) development in my daytime job. It can be... tiresome. Past couple of years i've built a soundcloud-like app using htmx, nodejs, express, mysql. Loved every minute.
Thank you for all your effort on htmx.
Edit: spelling.
Re: Why you should choose HTMX for your next web-based side project (2024)
#58HTMX 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.
Where HTMX would run into trouble is complicated frontend logic, where updates of one area may trigger changes in another, etc.
Re: Why you should choose HTMX for your next web-based side project (2024)
#59Earlier quoted context omitted.
That is more or less how flutter works on the web, right?
"works". name one thing using "flutter web". Flutter is just the thing startups use until they can hire a dedicated IOS person and fork the "app" codebase.