Live data from Hacker News

Django 4.0

djangoproject.com

111–120 of 226 posts

Re: Django 4.0

#111

Where are we on the whole Django versus Rails debate? (Not cannonfodder, I am genuinely curious)

I'm biased because out of the two I've only used Django, however since learning Django my urge to learn Rails has gone down quite a bit. Its still there, and Rails does look fantastic, but so does the hundred other frameworks and languages on my todo list.

I guess the only takeaway you can get for that is that Django, at the very least, works fine, and probably will solve the problem you come in with unless you want it solved in a very specific way

Re: Django 4.0

#112
Thank you Django. that’s a great news.

14 years ago someone helped me discover Python and Django.

I started from django official tutorial and never changed the framework of choice.

It was my hobby, my career, my tool to put the food on the table.

12 years later I have started building a way to solve deployment question.

started from bunch of scritps. today I have made cost effective tool to deploy Django projects and pretty much any python app on AWS/Digital Ocean

https://appliku.com/

it is like heroku but uses you own cloud account and not expensive at all.

Re: Django 4.0

#113
post #45

Django has allowed me to enjoy some side entrepreneurship. I have released three products as a solo part time dev that I would never have been able to do in a reasonable time using Java/Spring (my strongest stack). My first project went nowhere, but the second generated 1k+ a month and sold for 50k, and the third one is following a similar trajectory. My advice - keep it simple - function based views - centralize acc…

Did you ever have to use Vue or other reactive frameworks with Django? Do you use DRF at all or just mostly Django?

Re: Django 4.0

#115
Love Django, yet the transition from local development to deployment, in my opinion, continues to be just plain ugly and painful.

I've written about this before. I think the stock Django dev configuration needs to change to something that is equivalent to a reasonable deployment on a common VPS, whatever that means. The development server is a nice trick, but the things you have to do to move to a real server are painful. Same with SQLite. Why not come up running PostgreSQL by default?

I am sure there are varied opinions on this. All I have to say is that, over the years, I developed a document to help with deployment on standard hosting platforms, like Linode. It is staggering when compared to the experience of deploying something like a Wordpress/PHP site on the same or similar platform.

This, from my perspective, is the weakness for Django, everything else I love and enjoy.

Re: Django 4.0

#116

Earlier quoted context omitted.

It's great for getting things up and running. And can last a long time. But now that we're 40 devs or so working in the same 400k LOC codebase, I'd prefer Java/Spring (or really, Kotlin). So hard to maintain django in the long run, need to be really strict, or one ends up with each app spaghettied with other apps. Doing queries where you filter deep on other apps' models, and since it's only done as kwargs with no ty…

Yes, but nothing is stopping you from typing and organizing everything, right? I agree that it's not the default, which isn't ideal, but you can do it fairly easily (and keep it enforced).

Problem is that the typing with mypy is in general not a very strong guarantee in Python, and combined with Django most of it's almost useless. Sooo many kwargs doing magic stuff, or types being lost after being through some django functions.

And hard to do the organization propably in django, doing it breaks much of the benefits of the orm for instance. People will do what's convenient, and in Django that's writing unmaintainable code.

Re: Django 4.0

#117
Django made me fall in love with programming. I built 2 decent-sized side projects with Django. They didn’t gain traction, but I loved using the framework.

Then I went through a couple of (depressing) years of using Java/Spring professionally, and recently I made the choice to move to Elixir/Phoenix. It’s going great, and I don’t think I would go back to heavy OOP if I didn’t have to.

Some things I really miss from Django:

- Models with more centralized validation logic. In Phoenix (and somewhat similarly in Rails), you need to edit your migration, schema, and changeset. In Django, you edit your model and the migration can usually be made automatically with no need for a 3rd-party package.

- Django REST Framework. You can get pretty far with an app just by leveraging ModelSerializers and ModelViewsets. It’s ridiculously elegant, simple, and powerful.

- The Admin layer is fantastic and unparalleled.

Some things I wish Django would add/enhance:

- Making it more clear when you’re going to hit the database (explicit is better than implicit).

- True async up and down the stack. Not a small task within the Python ecosystem, but I think for folks who are not already invested, looking at Elixir/OTP/Phoenix is too tempting. If you don’t have kids to transport with you, a Lambo looks much more fun than an S-Class Sedan.

Re: Django 4.0

#118

Where are we on the whole Django versus Rails debate? (Not cannonfodder, I am genuinely curious)

If you are starting a business, use whatever language you already know. The benefits of one framework vs. the other are a rounding error compared to language fluency. (They are both great, in other words.)

If you are learning both language and framework from scratch, check the local job market. 5 years ago in the Bay Area there were roughly 2x as many Rails job postings as Django, though I doubt it is this lopsided now. Also Python is used more broadly than Ruby, eg for ML and scientific/numeric work.

Re: Django 4.0

#119

Earlier quoted context omitted.

>avoid fat models, use a service layer I had not heard the term "fat models" before so I googled it. It did not go in the direction I expected.

Another classic is "c string".

I just got results for repairing cellos and violas. "G string" got the expected spicy content in addition to violin repair ads. Surprisingly, no string bass repairs (in spite of the bass also having a g-string)

Re: Django 4.0

#120
post #3

I must learn Django, it's got everything I'll ever need. No, Rails will make me happy and it's better for lonely devs like me. No I must learn a Modern Web Framework (TM) to prove I'm not stuck in the past. No way, I'm not a fashionista. Have you seen that Phoenix demo where the guy builds Twitter in like 4 minutes? That's the future. Hold on a minute, enough of this magic. I need to learn to build everything in Comm…

There are just so many makes and models of automobile and people get by. I remain so confused why choice paralysis is a thing in software. Maybe the libraries need to cost 30,000$ ;-)

Different cars are much more obviously different than different web frameworks. When car shopping, you know whether you're looking for a RAM3500, an Odyssey, or a Mustang. Sure, the F-150 may win out in the end, but the Caravan and Charger were never contenders when looking for a truck.

Choosing between software (especially bikeshedding between languages that both place priority on being pleasant to write) is often like comparing a Tacoma to a Tesla on the quality of seat heaters, upgrade price for the sunroof, and selection of factory paint options. Worse, you can't often have a clear understanding of the difference without investing the time to gain direct experience with each option. Otherwise, you're relying on community reputation and hoping it's both accurate and not horribly out of date.

Post reply on HN