Live data from Hacker News

The Decline of Django

david-dahan.com

11–20 of 173 posts

Re: The Decline of Django

#13
I'm pretty happy with the Django projects I start out these days. Most of them are just GraphQL APIs that interact with a React SPA, with a nifty admin built right in. You don't necessarily need to use all of the components of Django to get a tremendous amount of value from using the framework. It used to be a very much "batteries included" framework, whereas now I'd consider a bit closer to "cafeteria Catholic". Still philosophically a far cry from "omakase".

Re: The Decline of Django

#14

If I were to have a Django backend and only be serving Json responses, what combination of methods/libraries are commonly used for that? Such as input validation, client side request sending, etc.

I think the only real option here would be DRF, it's a very mature library to switch Django from website builder to API backend

Re: The Decline of Django

#15

What’s better?

Flask? Maybe FastAPI.

I second FastAPI! In my mind it's, "Flask, but better." The killer feature in my mind is that it leverages type hinting and dataclasses, using Pydantic, to take away a lot of the grindyy, boilerplate parts of writing an API, like type checking, dependency injection, generating good error messages, generating API documentation, ...

Even when I'm not using FastAPI now, I use Pydantic everywhere. Types in Python, while not nearly as useful as in a strongly typed language, are a dream come true.

Re: The Decline of Django

#16

Eh a lot of these seems like strengths of Django. Rails chasing the SPA dragon has been a source of endless pain.

Could you elaborate? After a ~10 years hiatus I revisited Rails last year and whipped up a CRUD app with auth in no time. No SPA in sight.

They've been mucking with the asset pipeline every single version and their forray into webpacker has been a disaster. Turbolinks and ActionCable have been attempts to compete with SPAs while still being SSR but both are just glitchy and a source of endless Heizenbugs. Thankfully Rails7 looks like they've restored sanity.

Re: The Decline of Django

#17
"Not as hip as tiktok" and not modern because the page reloads when navigating? It's not suitable for an API because... no real reason given, and the myriad projects doing this left unmentioned.

I think there are a lot of good reasons to criticize Django, this blog post failed to find them.

Re: The Decline of Django

#19

If I were to have a Django backend and only be serving Json responses, what combination of methods/libraries are commonly used for that? Such as input validation, client side request sending, etc.

That would be django-rest-framework.

Re: The Decline of Django

#20

What’s better?

Rails.

Switched from Django two years ago and never looked back. Having worked with both, Rails is more polished and pleasant to work with.

Side note: if you're building a business and already know Python/Django, stick with them!

Post reply on HN