top | item 29320584

(no title)

colbyhub | 4 years ago

Another one to consider is https://www.django-unicorn.com if you want that LiveView feeling for Django.

For my latest project[1], I've opted for https://unpoly.com instead of Alipine+htmx as Unpoly allows me to write 100% server-side code and sprinkle some progressive enhancement where desirable. As a result, I can offer a no-JS experience (minus the Stripe Checkout) for those who may want/need it. Additionally, it forces me to focus solely on the server-side, and I write more idiomatic Django code as a result.

[1]: https://heraldsms.com

discuss

order

benbristow|4 years ago

https://www.django-unicorn.com/examples/count-characters

Sending an AJAX request every time you enter characters just to count them. Ewwww.

adparadox|4 years ago

Howdy, creator of django-unicorn here. Some of the UI-specific examples are a little contrived and wouldn't be what I consider a really great idea, but it's more to show the possibilities, i.e. instead of counting characters, you could do a heavy ML task to analyze the text.

Personally, I mostly use Unicorn as a component library to split up functionality from the view code, and as a way to persist data to the backend (which would already be an AJAX call) without the hassle of creating an API, dealing with serializers, etc.

alpha_squared|4 years ago

I guess that's the extreme end of no-js. Wanting to use compute, but philosophically sticking-to-your-guns on where that compute happens.

porker|4 years ago

I've been looking at these libraries and Unpoly looks the most promising for my needs. HTMX looks good as well but Unpoly's infinite layers feature [1] rather grabbed my attention :)

Stimulus is the one I can't get myself to like. Separate JS controllers is clever but the DSL and general nature - it just doesn't click with me.

[1] https://unpoly.com/up.layer