4 ms·
> I think Unpoly is more based the concept of "frames" that can be changed dynamically, so in some ways it is very similar to HTMX with it's updating fragments.
by infamia 4y ago
> I think Unpoly is more based the concept of "frames" that can be changed dynamically, so in some ways it is very similar to HTMX with it's updating fragments. But I'm assuming it is diffing the DOM rather than just replacing it as HTMX does.
That's fascinating, thanks for sharing. I will have to play around with Tetra. Based on your description, it certainly feels like, "Greetings. We are from the future." :-)
My experience with HTMX and Unpoly is limited to building three prototypes (once each in HTMX and Unpoly). Based on that:
* For Unpoly, you mark HTML elements that you want Unpoly to monitor/manipulate. Then some event happens (e.g. the user submits a form, clicks a link, etc.).
* Then Django returns the entire page, just like an old school, web 1.0 app.
* Finally, Unpoly looks at the entire page and finds the elements it's told to monitor/change. Then it swaps those elements in the DOM (if needed), which prevents a page reload.
You should look at Unpoly to see if it sparks any ideas. Its layers feature [0] in particular is really awesome. In the link below, it shows how to (from a high level) use layers to build something pretty complicated like Gmail, while keeping the back end code relatively simple using any SSR framework (Django, Rails, etc.).
[0] https://unpoly.com/tutorial https://unpoly.com/tutorial