> [HTMX] can get you 80% there with radically less complexity. No extra dependencies, no build step, no advanced tooling (now re-written in Rust!), no complicated state management, no “double data” problem, no hydration mismatch… Just write your HTTP server and return HTML!
Finished the "Reset Timer" feature as well as adding sounds for "Pause" and "Resume" (that way you can hear when the timer is paused without having to look at it all the time).
With the help of a viewer, was able to DELETE the kludgey JavaScript code and let #htmx handle all of the work of playing audio. Sending an <audio> element over the WebSocket with autoplay worked as desired!
Modern React.js with Vite is really nice, with out of the box TypeScript support and all, but by far my favourite text stack is most likely #php with #htmx. It's the simplicity that gets me.
Some nice feedback on django-template-partials on the hellsite.
Translated from the French:
> A package that helps me organize my templates in my #Django and #HTMX projects is django-template-partials from @carlton. This is the library that has had the most influence on my code in a long time.
Doing a talk at lunch today covering how to improve #ASPNET#RazorPages with #HTMX. I have to give this talk a few times in 2024 at conferences, so it's a great way to improve the content before then. Wish me luck!
Usssh, now I’ve done it. I actually have to talk about htmx and blazor next monday. So I need all you folks help, what are the libraries you are using? What are the good and bad things about that combo?
@brtkdotse@egil This might be controversial, but here are my thoughts on why you technically may want to use #Blazor and #htmx together and why you wouldn't.
I have social reasons why you may want to prefer one over the other, too. But that's more opinion ;)
Using #htmx in my apps has let me turn the "no logic in HTML templates" all the way up to 11.
I am now very aware (and suspicious) of any logic being evaluated, or even things like string concatenation, being done in HTML templates.
I may have to write a tool to warn me (or fail a test!) if I start using th:if, th:unless, or anything that looks like a method call in my Thymeleaf templates.
After a bit of playing with #FastAPI, I feel like it's really, well, API-oriented. You can have templating of course, but it's just a liiiittle clumsier than returning JSON (e. g., you need to manually inject the request into it).
So I'm not entirely sure if I should stick to my original plan of mostly rendering HTML and using #htmx, or if I should go with the framework flow and make a #Vue app. Probably the latter TBH.
This is a good talk on #htmx by Martijn Dashorst if you need more examples/exposure. Plucked one of my favorite slides from the talk below (make sure to follow the slide link as well -- so great -- to Roy Fielding's original talk).
If you're curious about #HTMX and #aspnetcore and how they can work together, check out this sample using Hx-Trigger to trigger other elements to update from a single request.
This is nice if you have global shared state like a shopping cart, score, etc.