How is it a "full-stack framework" when it's "for Django" that provides the backend service? Also on their own homepage they mention "Using other frontend frameworks with Django", so I'll conclude it is in fact a frontend framework for Django.
This is subjective and in part marketing but given that it is installed with pip install django-unicorn and used with from django_unicorn.components import UnicornView like any other python module used in a Django app, I'd say that it brings the full stack inside Django, much like its counterparts for Laravel, Phoenix and Rails. What was only backend plus server side generated pages is also Javascript now, written in…
Unicorn – A full-stack web framework for Django
71–80 of 92 posts
Re: Unicorn – A full-stack web framework for Django
#72I wondered how Unicorn compared to htmx. They're giving an answer on their website: htmx and alpine.js are great libraries to provide interactivity to your HTML. Both of those libraries are generalized front-end framework that you could use with any server-side framework (or just regular HTML). They are both well-supported, battle-tested, and answers to how they work are probably Google-able (or on Stackoverflow). Un…
I wouldn’t consider htmx “battle tested”.
htmx is a very small and very predictable library. The underlying pattern is well established among many libraries and probably countless similar implementations.
I have implemented something like htmx several times before htmx came out, and I assume many others have too. I just didn't take the time to extract a clean, generalized and comprehensive library.
Re: Unicorn – A full-stack web framework for Django
#73React aside… hooks, classes redux fatigue whatever- JSX is beautiful and any other framework that builds this quasi irb+mustache+html-like-markup is taking 2 steps back. I would like to see JSX survive the framework wars of 2024-2025
Re: Unicorn – A full-stack web framework for Django
#74Shame there's no jinja support, I really can't stand Django templates.
Re: Unicorn – A full-stack web framework for Django
#75Earlier quoted context omitted.
This is subjective and in part marketing but given that it is installed with pip install django-unicorn and used with from django_unicorn.components import UnicornView like any other python module used in a Django app, I'd say that it brings the full stack inside Django, much like its counterparts for Laravel, Phoenix and Rails. What was only backend plus server side generated pages is also Javascript now, written in…
As in "alternative views for Django"?
Re: Unicorn – A full-stack web framework for Django
#76Django was a "batteries included" framework about 10 years ago. But the core team had very strong opinions about javascript, saying that picking a javascript framework should NOT be part of those batteries. Time has passed, and javascript is now part of every single website or app we build. Django still doesn't give any help to developers that wants to build a modern site. My opinion: They should go the Phoenix Live…
Re: Unicorn – A full-stack web framework for Django
#77I wondered how Unicorn compared to htmx. They're giving an answer on their website: htmx and alpine.js are great libraries to provide interactivity to your HTML. Both of those libraries are generalized front-end framework that you could use with any server-side framework (or just regular HTML). They are both well-supported, battle-tested, and answers to how they work are probably Google-able (or on Stackoverflow). Un…
Doesn't HTMX work via HATEOAS so would require a full RESTful backend?
I still don't understand what they mean when they say "HTMX is HATEOAS": it's not parsing the response to decide things based on relations, it's not following any links, you can still have out-of-band info if you want...it's just substituting a string given by the server on the DOM.
A JSON API can be as hypermedia as HTML (I remember HAL-FORMS and Collection+JSON). A web app that consumes such an API is doing "HATEOAS" even if it's using React.
I really like the HTMX project (that and Unpoly are a godsend) but sometimes it sounds more grandiose than it is: just the regular web doing what it always did, except you program the interactive fetching/swapping of pages/fragments in HTML instead of JS, i.e. AJAX with HTML attributes.
Re: Unicorn – A full-stack web framework for Django
#78Re: Unicorn – A full-stack web framework for Django
#79ST was easily the most pleasant experience I've ever had developing front end using a Python backend.