4 ms·
> It's a DSL in HTML attributes which covers almost all of what I need to build a dynamic web application. Not quite though right? There's a very tightly coupl
by jddj 3y ago
> It's a DSL in HTML attributes which covers almost all of what I need to build a dynamic web application.
Not quite though right? There's a very tightly coupled (and fairly useless for anything else) sibling endpoint for each of those calls, which exists on a backend somewhere to return the html that you need to progress.
The alternative exists. You can spin up a rest API around a database schema in all of 5 minutes (eg. Pocketbase). Put alpinejs on the front end and you have everything htmx can do with no need for the server to get involved in whether or not a modal is open or closed on some client somewhere.
- recursivedoubts 3y agohttps://htmx.org/essays/two-approaches-to-decoupling/ https://htmx.org/essays/two-approaches-to-decoupling/ https://htmx.org/essays/splitting-your-apis/ https://htmx.org/essays/splitting-your-apis/
- jddj 3y agoUnfortunately, the more of this I read the more I'm convinced. Especially in the context of rapid prototyping but also in larger projects. I love serverside templating. I use go templates, asp net razorpages and old laravel blade across various projects. It's hard for me to see the enthusiasm for htmx as anything but an overcorrection from react, and the project itself feels like it chooses ideology over function (nothing wrong with that, just not great for getting things done). In a year I do think we'll see the typical stream of rewrites.
- recursivedoubts 3y agomaybe https://htmx.org/essays/a-real-world-react-to-htmx-port/ https://htmx.org/essays/a-real-world-react-to-htmx-port/
- hirvi74 3y ago> I use go templates, asp net razorpages and old laravel blade across various projects. HTMX + Razor Pages/Views is so freaking nice. It's seriously increased reusability so much for me. HTMX has also greatly reduced the amount of JS I have to write for the same functionality I was getting with Vanilla JS. Depending on what I need, I find the JS API that HTMX has to be very helpful, albeit I wish a few things were a tad better/more clear in the docs for that area (or I was just too much of an idiot to figure out). None the less, I have no intentions of jumping ship from HTMX anytime soon.
- naasking 3y ago> Put alpinejs on the front end and you have everything htmx can do with no need for the server to get involved in whether or not a modal is open or closed on some client somewhere. Modals are driven by database state, so you can't really get rid of that.