News for hackers. Stuff that matters.
Re:Django Unicorn – A full-stack framework for Django by Biganon on Saturday June 05, 2021 @06:03AM (#27403681)
The name is poorly chosen. Many people use gunicorn as a WSGI server in combination with Django, it might even be the most commonly used one (with uwsgi), and I feel like this name is much too close.
Re:Django Unicorn – A full-stack framework for Django by implying on Friday June 04, 2021 @07:33PM (#27400352)
Partly telling that we're in a frameworks-for-frameworks stage of webdev.
Re:Django Unicorn – A full-stack framework for Django by sombremesa on Friday June 04, 2021 @08:33PM (#27400797)
Things have gotten easier, the barrier to entry is lowered, and despite things being a million times easier than they used to be, they're 'too hard' for someone (it's all relative, after all). So frameworks like Unicorn and Livewire [0] pop up to address these issues...

At a glance it seems to be effort directed towards the spirit of no-code, but the fact that people using these tools can code is the crux of this phenomena. It's a natural tendency to make things easier for ourselves and it's hard to know when to stop as a programmer.

[0] https://laravel-livewire.com/

Re:Django Unicorn – A full-stack framework for Django by AlchemistCamp on Saturday June 05, 2021 @07:04AM (#27403948)
Both are inspired by Phoenix LiveView: https://www.youtube.com/watch?v=8xJzHq8ru0M
Re:Django Unicorn – A full-stack framework for Django by llIIllIIllIIl on Friday June 04, 2021 @09:11PM (#27400993)
Just yesterday started exploring sockpuppet[1] and was impressed with the speed. Websockets made any change feel instant. Also liked how it uses data attributes to specify dynamic behavior. It should be powerful enough to build simple interactions but has clear way to extend for complexity. Will try today how sockpuppet works with django-tenants[2], if it does it will become my go-to toolset for web development.

[1]: https://sockpuppet.argpar.se/ [2]: https://github.com/django-tenants/django-tenants

Re:Django Unicorn – A full-stack framework for Django by leephillips on Friday June 04, 2021 @09:18PM (#27401041)
Another option is htmx.org. It's similarly small and unobtrusive, and I've found it easy to incorporate into Django templates.
Re:Django Unicorn – A full-stack framework for Django by readonthegoapp on Saturday June 05, 2021 @08:26AM (#27404335)
This shit looks cool

As do some or many of the other competing technologies

I've been struggling to pick a stack that is super gd simple

But still let me do some SPA stuff for certain parts of the app

I might never actually write a line of code myself, but even so I want to easily be able to tell what my contractor is doing

And fix if necessary

Guide architecture

Maybe choose the initial stack in the first place

I'm overwhelmed at this point as to which stack I can use that will suck the least

Prob the biggest issue I have is just that '80%' number I often see thrown around with these new front end non-js js frameworks

That is, this will probably be able to handle about 80% of your use cases

Tf?

Noooooo

100%, please

At least, 100% of all up-to-medium-or-high complexity use cases

Not that I'm planning on rocket science

The question I want answered for any new tool like this is

Can it do basic UI interactivity like Duolingo?

Ok, then I'm in

Other than that

How to really compare this unicorn for django with livewire for laravel, inertia and or vue for everything, nuxt (which looks interesting), etc.

And my preferred contractor prefers rails, gd.

Re:Django Unicorn – A full-stack framework for Django by replwoacause on Saturday June 05, 2021 @11:11AM (#27405697)
I found this post to be almost unintelligible.
Re:Django Unicorn – A full-stack framework for Django by _bhlv on Saturday June 05, 2021 @04:19PM (#27408167)
You're not alone. I read it twice. Still don't get it. I think he's using Google Translate or something
Re:Django Unicorn – A full-stack framework for Django by firedan on Saturday June 05, 2021 @01:57AM (#27402599)
What? This example code contains so many issues...

- why would you write every character to the backend? Do they really encourage storing UI state in the backend? - this approach fails greatly if a second user starts typing - it says "no need to learn an additional template language" but continues to define it in the input tag

It looks like the developers of this framework aren't too much into actual client development. Example code should be at least valid to a certain point.

Re:Django Unicorn – A full-stack framework for Django by _throwawayaway on Saturday June 05, 2021 @10:37AM (#27405408)
This thing makes total sense and seems like a missing piece of Django
Re:Django Unicorn – A full-stack framework for Django by snicker7 on Saturday June 05, 2021 @04:13AM (#27403215)
Too complicated. I need a framework for Unicorn.
Re:Django Unicorn – A full-stack framework for Django by vira28 on Saturday June 05, 2021 @10:16AM (#27405239)
I thought Django is a framework..
Re:Django Unicorn – A full-stack framework for Django by junon on Saturday June 05, 2021 @07:26AM (#27404031)
Django is already terrible. Why build a framework on top of another framework?

This is madness.

Re:Django Unicorn – A full-stack framework for Django by tticvs on Sunday June 06, 2021 @06:06AM (#27412019)
I agree, the “batteries included” approach makes it very attractive for a new startup to use to get off the ground quickly. But in every case I have seen (3 separate companies now) it lets the team run up a huge amount of tech debt and get a lot of features locked into a very unscaleable, unperformant, architecture.

It’s tempting to prototype with it, but I can’t think of a single use case that wouldn’t be better served with another framework.

Django is not appropriate for production imo

Re:Django Unicorn – A full-stack framework for Django by boxed on Sunday June 06, 2021 @12:06PM (#27414042)
What a load of crap. I worked for 10 years on a huge code base.

Using flask and SQLAlchemy is worse in every way for example.

Re:Django Unicorn – A full-stack framework for Django by tticvs on Monday June 07, 2021 @06:34AM (#27420981)
Yes, those would also be a very bad choice for a large project. But at least they have the advantage of being very lightweight so can be a good fit for adding simple crud features to a microservice, especially ML services that already need to use python for other reasons.

Django is the worst of both worlds. Not suited for small services, and not able to scale with large ones.

To your "load of crap" point, web development looked very different >10 years ago, Django was a lot better fit for that era. There is _zero_ reason to use it today.

Re:Django Unicorn – A full-stack framework for Django by boxed on Friday June 11, 2021 @02:44PM (#27477027)
What would you suggest as an alternative?
Re:Django Unicorn – A full-stack framework for Django by junon on Sunday June 06, 2021 @07:25AM (#27412360)
Entirely agreed. This has been my experience as well.
Re:Django Unicorn – A full-stack framework for Django by legostormtroopr on Saturday June 05, 2021 @08:35AM (#27404399)
What makes you think Django is terrible
Re:Django Unicorn – A full-stack framework for Django by junon on Saturday June 05, 2021 @10:37AM (#27405412)
I worked with it exclusively for a year. Its ORM is magic, its performance is terrible, its configuration is cryptic at best, its handler system is worse than just writing your own.

Everything about Django is terrible.

Re:Django Unicorn – A full-stack framework for Django by boxed on Sunday June 06, 2021 @12:08PM (#27414057)
I worked with it 10 years.

The ORM is pretty trivially understandable and not magic at all.

The configuration is pretty straight forward and we'll documented.

The url routing is pretty good although it could be improved. It's a lot better than flask when you go beyond an MVP at least.

Re:Django Unicorn – A full-stack framework for Django by junon on Sunday June 06, 2021 @12:30PM (#27414213)
Sorry, but creating reverse reference fields at runtime that can't be statically checked or enumerated is 100% magic.
Re:Django Unicorn – A full-stack framework for Django by boxed on Friday June 11, 2021 @02:43PM (#27477018)
You mean of the models? But those are literally created at import time. That's as close to "statically" as things get with python really (except the text of the code).
Re:Django Unicorn – A full-stack framework for Django by _throwawayaway on Monday June 07, 2021 @11:08AM (#27423466)
Would you mind pointing to the example of a system with less or no magic?