Live data from Hacker News

The Decline of Django

david-dahan.com

31–40 of 173 posts

Re: The Decline of Django

#31

What’s better?

Flask? Maybe FastAPI.

Would go FastAPI for new projects.

Either is good if what you are building is something small and very focused or if you already know exactly what you want to build and want to have freedom making decisions about most aspects of the application.

But if you don't know yet what the product will be, a battery included framework like Django is very nice to get out the door quickly without having to worry too much how to structure the code, what library to use for x, etc.

Re: The Decline of Django

#33

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's probably not the right use case for Django (I say this as someone who defaults to Django for new projects unless there's a compelling reason not to).

Something like FastAPI would be better suited to a narrow use case like that, as that's what it specializes in.

Re: The Decline of Django

#34
The only point I can sympathize with a little bit is the default admin UI looks, which could be a little more modern.

In any case, I don't know of any one other framework with a remotely comparable admin interface in terms of capabilities and usability out of the box, so there's that. I'd be happy to be proven wrong.

For everything else (even async with channels), as long as you don't stray too much from the django way, you'll be immensely rewarded by how neat and easy to navigate even large applications look.

Re: The Decline of Django

#35

I can't comment on every use case, but I've recently been using htmx[1] with Django templates to provide sort-of async behaviour. For me it's the best of both worlds; I can specify my template and view as though it's a normal page load, and then use some hx- attributes to make it async. 1. https://www.mattlayman.com/blog/2021/how-to-htmx-django/

Yep. I wrote a web app a few years ago that was moderately popular in its niche, using Django and htmx's predecessor, intercooler to add interactivity. I think the big issue with this article is that the author fundamentally wants to write client-side apps, and Django is a server-side framework, so it's not really meeting his needs.

The async issue is valid — I have wanted to use server-sent events with intercooler/htmx — but the answer seems to be just to use Django Channels, or be patient and wait until the async features are actually finished.

Re: The Decline of Django

#36
Seems like a strange bit of feedback to me. My company uses Django as the backend for our REST API and it's simply phenomenal. Django isn't a complete solution out of the box, but that's why things like Django REST Framework [0] exist. It supports JSON-based views and has an excellent serialization layer that can map directly to the ORM models.

This setup does NOT help with serving our frontend app, but we're using React for that anyway and I'm not sure I'd want our frontend so tightly coupled to the backend.

The fact that Django is mature and extremely stable between versions is a huge selling point for us. I'm not interested in making sweeping changes to our backend just because someone invented a new paradigm that may or may not be helpful to our app (eg, GraphQL).

That said, rendering HTML templates server-side does feel pretty archaic these days. I think it would be great for Django to take a more API-centric approach for a default installation. I can imagine that anybody coming from the JS world would feel totally out of place in terms of how Django works out of the box.

[0] https://www.django-rest-framework.org/

Re: The Decline of Django

#37
The fundamental premise of this post is that a boring web framework is bad, but making basic websites doesn't need to be an exercise in bleeding edge frustration.

Django, many years later, still presents a straightforward solution to a straightforward problem, (almost) all batteries included.

Re: The Decline of Django

#38
Django is good. But I’ve used laravel and .bet core a lot before trying django for my personal projects. Honestly I get what the author meant by the docs is overly documented. It’s not to the point, also it’s hard to find things.

Aside from all the sweet things you get with django, creating an api only project feels very “hacky” for me with an extra package to install (DRF)

Re: The Decline of Django

#39
1) Documentation is too verbose

2) Onboarding new developers lacks IDE specific tooling for free

3) Admin GUI isn't great

4) Async support is still incomplete

5) Static types aren't used in Django

6) Django is MVC which isn't useful if you just need a light V

7) People ignore other, newer tech because Django exists

What??? 4 and 5 are legit complaints, the rest is literally the nittiest of picks, in my opinion. You don't like a framework because it's so good, people don't experiment with newer frameworks?? And that's in your article about the decline of that framework?

This is a weird article, man. I am surprised they haven't figured out async yet, and I guess if you really like static types the lack of them in Django would be annoying, but otherwise this just seems like you set a goal to write about a topic, and forced yourself to come up with an article you thought hasn't been written before. Like, it feels like you wrote the title of the article, and then tried to come up with the rest of it after the fact.

Re: The Decline of Django

#40
post #20

Earlier quoted context omitted.

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!

I swear I saw an article on here a few months ago about the decline of Rails

Someone needs to coin the term "mansion-shedding": Bikeshedding, but it's about the choice between two or more proven, reliable, working solutions.
Post reply on HN