3 ms·
I could ask the same question I guess, what do you get from HTMX that I can't get from Unpoly?. I think you can achieve the same thing with both, but Unpoly is
by 0xblinq 3y ago
I could ask the same question I guess, what do you get from HTMX that I can't get from Unpoly?.
I think you can achieve the same thing with both, but Unpoly is higher level, that means I have to write less attributes/code to achieve the same stuff I guess.
"Compilers" are also a nice way to attach custom code. All the helpers for form validations, the extremely easy way it provides to do modals, and layers in general. The navigation feedback (a'la turbolinks) when navigating across pages, the caching, the error handling. The up-keep for keeping a video player or anything else across pages transitions, and absolutely everything of this can be accessed from a JavaScript API in case you need to perform any of this from your own code and most of these APIs also trigger events.
Probably you can do all of this with HTMX too, but it is more work.
- JodieBenitez 3y agofrom the tutorial: "You can update multiple fragments from a single request by separating selectors with a comma." "The server still renders full HTML pages, but we only use the targeted fragments and discard the rest" Wow... Of course full pages should have a lean markup, otherwise a lot of data transfered could be useless, but that's a pretty neat feature
- 0xblinq 3y agoYou can always detect server side if it’s an Unpoly request, and which fragments it is asking for as that information goes in the request headers. Or point the request to another view that just returns those fragments. But I don’t think many apps need this level of optimizations.
- JodieBenitez 3y agoI am now converting an app from htmx to unpoly. Indeed, much less attributes to write and now my app has proper browser history and full page rendering linked to this history, all with minimal effort. This is brilliant, how come I never heard of unpoly ? Thanks for pointing to it.
- 0xblinq 3y agoIt has a marketing problem for sure, given how everyone loves HTMX and nobody even heard of Unpoly. Not that I'm a fan of doing marketing of tech, but... that's the explanation I find for it.