Given gunicorn and uvicorn, I can't help but feel this name can and will cause some confusion. We gotta be able to pick different names lol
Unicorn – A full-stack web framework for Django
21–30 of 92 posts
Re: Unicorn – A full-stack web framework for Django
#22How 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.
Re: Unicorn – A full-stack web framework for Django
#23Something that is nagging me though is the (still) rather incomplete take on client-side reactivity. Alpine.js is by-and-large addressing this in a pleasantly minimalistic way, but for this new take to become a defacto standard of lean and mean modern web development I feel there should be uniform semantics and integration that spans the different server-side stacks. This way code and knowledge would be reusable and not tied to a specific language/web platform.
Re: Unicorn – A full-stack web framework for Django
#24How 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.
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 inside the backend without even having to know Javascript.Re: Unicorn – A full-stack web framework for Django
#25Earlier quoted context omitted.
Batteries included means the stuff you need for most uses is already included. The fact that there are many possible add ins to solve this doesn't address the fact that Django does not include core functionality for web applications.
You mentioned running nodejs + typescript over extensive frameworks like django now. Curious if you chose to write your own framework or are you using something from nodejs space to do "batteries included" thing for you? Asking because I've had some experience with nest.js and even though it's fun it often feels hackish and a bit messy even when solving standard issues like authorization that's not a simple app wide…
I can say that nodejs and TypeScript and pure SQL is so simple and straightforward that I seem to need almost nothing in terms of "framework". I just write endpoints with a query behind them.
On reflection I spent alot of development time hacking around in Django models/forms and the ORM and really almost none of that is needed if you just write straight SQL with Postgres. It's just unnecessary complexity - once you cut all that guff out then things start to become REALLY simple. Request/auth/query/response.
I put auth into a separate web application which gets called by Caddy (or you coudl use Nginx) as an auth subrequest. This makes auth extremely easy, and gives a very powerful decoupling and separation of concerns.
For many years I have thought, finally, that's the last time I need to write a user signup/forgot password/signin flow, but every project still seems to need it written, so I do that myself.
This approach of super simple, just talking to Postgres also would work well with Python but I have come to really like TypeScript more than Python. The latest Python projects I wrote were pretty much Starlette with asynpg talking to Postgres and no ORM or other fluff - that's a pretty nice combination, and asyncpg is the fastest Postgres driver for Python by a country mile which is also nice.
If I wanted RBAC then I would intercept all my SQL queries and wrap them in Postgres RBAC environment variables that implement the Postgres constraints. I've done this before with Django, it worked pretty well, but I think it would be nicer and cleaner in a system without ORM or database abstraction of any form.
Re: Unicorn – A full-stack web framework for Django
#26Re: Unicorn – A full-stack web framework for Django
#27I've done extensive development with Flask, Bottle, Django, Falcon, Django Rest Framework, Starlette, Sanic and FastAPI over about 13 years or so. These days I prefer to build my back end applications with nodejs, TypeScript and plain SQL (no ORM) talking to Postgres. I like Django but it pissed me off no end that it's called "batteries included", except that the very first thing you need to do with any Django projec…
The fact that the Django project and you have different preferences and consider different things essential is not a failure on their end. The fact that this "pisses you off" seems to indicate that you could channel your passion into more productive paths.
Re: Unicorn – A full-stack web framework for Django
#28Given gunicorn and uvicorn, I can't help but feel this name can and will cause some confusion. We gotta be able to pick different names lol
Re: Unicorn – A full-stack web framework for Django
#29My opinion: They should go the Phoenix Live View-route: adding a small websocket js layer, that permits reactivity while deferring as much logic to the backend as possible.
Re: Unicorn – A full-stack web framework for Django
#30I 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…