Live data from Hacker News

Unicorn – A full-stack web framework for Django

django-unicorn.com

31–40 of 92 posts

Re: Unicorn – A full-stack web framework for Django

#31
post #4

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

Isn't htmx intercooler.js without jquery, which is (intercooler) a 10 years old library been used extensively in a lot of sites?

Re: Unicorn – A full-stack web framework for Django

#32

Earlier quoted context omitted.

yes but unicorn offer a lot more than Django

so is it a new python web framework or is it a new web framework on top of Django web framework? It seems like too many layers of abstractions

Maybe Unicorn is to Django as the Apollo app was to the Reddit app

Re: Unicorn – A full-stack web framework for Django

#33

Django 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…

...you can just _do_ that? Channels, model save fires realtime frontend update, frontend handles that update.

Would be an awesome pattern to demonstrate, but doesn't have to be built in..

Re: Unicorn – A full-stack web framework for Django

#34
post #19

Earlier quoted context omitted.

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 don't really know what is different. 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…

I don't understand how what you're describing is batteries included where Django isn't?

It's typically not practical to solve "auth flows" in a centralized way -- needs are so different for different projects. There are tons of third party modules you can just plug in...

Re: Unicorn – A full-stack web framework for Django

#35

Django 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…

> Time has passed, and javascript is now part of every single website or app we build

That’s the problem - it shouldn’t be.

Re: Unicorn – A full-stack web framework for Django

#36

Earlier quoted context omitted.

I don't really know what is different. 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…

I don't understand how what you're describing is batteries included where Django isn't? It's typically not practical to solve "auth flows" in a centralized way -- needs are so different for different projects. There are tons of third party modules you can just plug in...

My batteries included comment related to Django, nothing else.

Re: Unicorn – A full-stack web framework for Django

#37

Django 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…

If they had chosen a JS framework as part of the batteries, that framework probably would've been deprecated by now. For instance, who still builds websites with Angular or Backbone/Marionette anymore?

See also Rails, which did choose a battery quite early on: prototype.js. Well, that was a wrong decision, so they changed it to jQuery (which is now also deprecated; no idea what it supports nowadays) and also dropped their RJS templating language. Lots of breakage and churn on every major release for us poor sods who made use of such features.

Re: Unicorn – A full-stack web framework for Django

#38
Unicorn is awesome, and I think most would agree that it's the Django communities answer to Livewire/Liveview/etc. Adam has built a brilliant project and the time he must dedicate to it is amazing!

Last year I had a month free and I had a go at building something for Django in this area, with a bunch of interesting ideas - built on Alpine.js, resumable server side component state, inline component templates. But sadly time is limited and I just can't spend the time needed to push it further. One day I may be able to pivot back to it, but would be very happy for someone to take some of these ideas and run with them - https://www.tetraframework.com/

What I really want to see is a modern asset + front end build solution for Django. It would enable more of these sorts of projects. Thats what needs to be built into Django.

Re: Unicorn – A full-stack web framework for Django

#39
post #31

Earlier quoted context omitted.

I wouldn’t consider htmx “battle tested”.

Isn't htmx intercooler.js without jquery, which is (intercooler) a 10 years old library been used extensively in a lot of sites?

Essentially yes. See https://news.ycombinator.com/item?id=23331672

Re: Unicorn – A full-stack web framework for Django

#40

Django 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…

I have done a lot of Django in my time but it feels like it has stood still for the last 8 years. Barely anything has changed in that time - the fact that you have to use a third party library to get a decent REST API is such an odd standpoint. And the laborious configuration routine that’s still required when you start each project should be a solved problem by now.
Post reply on HN