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…
Why you should choose HTMX for your next web-based side project (2024)
31–40 of 81 posts
Re: Why you should choose HTMX for your next web-based side project (2024)
#32Earlier quoted context omitted.
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.
Re: Why you should choose HTMX for your next web-based side project (2024)
#33HTMX 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…
Is it basically like Ajax?
Re: Why you should choose HTMX for your next web-based side project (2024)
#34HTMX 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…
Is it basically like Ajax?
HTMX is basically a framework for AJAX that lets you more quickly set up interactions in the markup instead of having to write scripts to manipulate the DOM yourself. It also tells on sending HTML fragments over the asynchronous request instead of JSON that has to be "rendered."
Re: Why you should choose HTMX for your next web-based side project (2024)
#35Earlier 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
It is the age old problem between better tech or better pay? What is even worse younger dev come in wanting to learn React cause it is the one that most job post is looking for. We end up negative economic to tech quality.
Re: Why you should choose HTMX for your next web-based side project (2024)
#36I 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…
Re: Why you should choose HTMX for your next web-based side project (2024)
#37Re: Why you should choose HTMX for your next web-based side project (2024)
#38Earlier quoted context omitted.
They didn't mention sending JSON though... and you can absolutely return HTML fragments in a JSON response.
Then what's the point of using HTMX? If you're not sending just exactly the necessary HTML to replace the target's HTML; if you need to parse JSON, then even jQuery would be better suited. The whole idea of HTMX is to get rid of the extra steps.
And since htmx also has template plugins, being able to feed JSON values into it makes sense to me... a similar project, EHTML has this feature.
Re: Why you should choose HTMX for your next web-based side project (2024)
#39Earlier quoted context omitted.
Is it basically like Ajax?
Yes. The cycle has completed and the old new things are new again. But they're still too new and unproven for the React-embroiled companies to switch just yet. HTMX is basically a framework for AJAX that lets you more quickly set up interactions in the markup instead of having to write scripts to manipulate the DOM yourself. It also tells on sending HTML fragments over the asynchronous request instead of JSON that ha…
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.
Re: Why you should choose HTMX for your next web-based side project (2024)
#40Considering most of my side projects are web based and I loathe JS and prefer MPA patterns, this is very intriguing. I admit I haven’t been keeping up with HTMX or new web frameworks. Anyone have any examples that are noteworthy?