Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd still pick Unpoly over it. Seems far more high level, feature rich and easier to use although less popular. And if I wanted a popular approach I'd pick Hotwire which can be used with any backend framework anyways.

https://unpoly.com/

https://hotwired.dev/



I am also interested in why you like Unpoly more. Genuinely curious because I use and like HTMX and don’t really understand what you get with Unpoly that you don’t with HTMX.


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.


from 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


You 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.


I 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.


It 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.


Can you expand a bit on why you prefer unpoly over htmx ? I like htmx but I'm genuinely interested in alternatives around the same concept.


Just answered this on a sibling comment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: