Live data from Hacker News

Django 5.0

djangoproject.com

141–150 of 237 posts

Re: Django 5.0

#141
What an incredibly powerful, robust, well-documented, carefully-designed piece of open source software. I love Django so much and I use it every day. A huge thanks to all developers and maintainers.

Re: Django 5.0

#142
post #3

Sadly I don't use Django anymore at work but it still has a special place in my heart. The ORM model is the best I've ever worked with and any other always feels clunky with sharp edges to cut you when you hold it wrong. In recent years Django had multiple major releases, I still remember it as being in 1.x forever. Does somebody know what changed within the Django Community that they break backward compatibility mor…

The ORM is OK as long as you refrain from using any inheritance. If you do, the database becomes a mess quickly and only that very Django app will be able to read and write to it (including manage.py shell). Anything else, other apps in any language or a SQL client, will be lost in a sea of tables and joins.

I've got a customer with two Django apps. One was developed enthusiastically in the object orientation way. The database is a nightmare. The other one was developed thinking table by table and creating models that mimic the tables we want to have. That's a database we can also deal with from other apps and tools.

Re: Django 5.0

#143

I usually hear this question the other way around but there it goes. Why should someone consider Django instead of something like Symfony or Laravel?

Because they know, or want to know Python

Re: Django 5.0

#144
post #3

Sadly I don't use Django anymore at work but it still has a special place in my heart. The ORM model is the best I've ever worked with and any other always feels clunky with sharp edges to cut you when you hold it wrong. In recent years Django had multiple major releases, I still remember it as being in 1.x forever. Does somebody know what changed within the Django Community that they break backward compatibility mor…

The ORM is OK as long as you refrain from using any inheritance. If you do, the database becomes a mess quickly and only that very Django app will be able to read and write to it (including manage.py shell). Anything else, other apps in any language or a SQL client, will be lost in a sea of tables and joins. I've got a customer with two Django apps. One was developed enthusiastically in the object orientation way. Th…

tbh, any OOP paradigms used with db tables will end up in a clusterf*ck.

Re: Django 5.0

#145

Earlier quoted context omitted.

> The ORM model is the best I've ever worked with and any other always feels clunky with sharp edges to cut you when you hold it wrong. Idk. I have to grant that Django ORM likes to make your life easy, but lazy loading on property calls is a dark pit full of shap punji sticks. Just overlook one instance where this is happening in a loop and say goodbye to performance and hello to timeouts left and right...

I sort of said this elsewhere. Others are saying "that's just what happens" and "well, Python?" but it doesn't just happen, and slow database queries are nothing to do with the application language. The problem is Django ORM, like Ruby on Rails, uses the Active Record pattern. Alternate ORMs, such as SQLAlchemy or Hibernate, uses Data Mapper pattern, which avoids the pitfalls of Active Record.

We can have 1+N queries in any language even without an ORM. Maybe an ORM facilitates mistakes because it hides joins but lack of experience is lack of experience. Some naive bad pseudocode:

  for book in select * from books:
    author = select * from authors
             where id == book.id
    print book.title author.name
In the real world that nested select could be hidden many levels down in method or function calls or even in code run from the templating language. Example: Django templatetags can query the database from the HTML template and any framework or non framework I worked with can do that too.

Re: Django 5.0

#146

Earlier quoted context omitted.

Yes, jQuery is often derided as outdated, but it worked quite well for a very long time, with minimal hassle for developers. In fact, I was working full-time on static Elixir/Phoenix pages with jQuery sprinkled on top as late as 2022… it felt a bit clunky but it worked as advertised and wasn’t frustrating in any significant way.

I still use JQuery because of all the syntactic sugar and shortcuts.

Me too, I prefer the API.

At the end of the day I’m delivering reliable and productive solutions for my clients, and they don’t care what the tech is.

However the Django API, GraphQL with React front end stack I’ve inherited is an frustratingly flakey to use and a nightmare to develop :-/

It’s so bad I’m regretting all my life choices that led me to this point LOL

Re: Django 5.0

#148

3 years ago I moved to fast growing startup that was founded with fast api slap-dashed together. I jammed Django down their throats and I can safely say it was the best decision we made as an Org. The teams using Django are far far more productive than the others. When a product I think is going to need users and roles and permissions, I grab Django off the shelf and never look back. Thank you mister reinhardt

Yeah this is definitely Django's strength - it has a lot of the stuff you're probably going to need already implemented. Massive time saver when you're setting things up.

Python definitely holds it back though. Does it have type hints yet?

Re: Django 5.0

#149

Just FYI -- there is so much mature Django and Python code out there than ChatGPT is really an excellent partner when you're building a Django project. Django is frankly the best web framework in existence, IMHO.

* if you can accept the flaws in Python for your usecase
Post reply on HN