Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Every time I tried to add an API to a Django project by using DRF, I was surprised by the sheer complexity it introduced to get basic things working.

I don't mich like the strict and inflexible DRF approach.

But great that they keep continuing supporting the framework for the people that like and use it. Or just use it.



As someone who has used DRF in many projects over a decade, I 100% agree. In my current project I’m using django-ninja which gives me the power of the Django ecosystem and ORM with the simplicity of FastAPI. This is the way.


Is django-ninja maintained? I've always disliked DRF and liked FastAPI, so Ninja was a natural choice, but my team ended up moving away from it because of it being less popular than DRF.


It is very much maintained and got it's 1.0 release not long ago. Sadly there is a single guy doing all the work for Ninja so the tempo of releases varies. I also think there is quite a way to the stability of DRF and DRF's ecosystem. If you want permissions and throttling for example you'll have to use django-ninja-extra which is pretty much "DRF but its Ninja".

For me personally I think the micro approach of Ninja / FastAPI is at odds with what I want out of DRF. I just want to make my crud stuff and not worry about implementing e.g. throttling, etc, on my own.


I think it's a bad idea to judge tech based on popularity. It just becomes a game of high school fashion drama, instead of getting work done.

Also, I think the comparison is unfair due to the sheer age of DRF. Check out this graph: https://star-history.com/#encode/django-rest-framework&vital... Then click the "align timelines" and you see that ninja is more popular than DRF was at the same age.


>I think it's a bad idea to judge tech based on popularity. It just becomes a game of high school fashion drama, instead of getting work done. I disagree. If one tool is way less popular, you risk it being discontinued. You do not want to start maintaining a web framework on top of your application nor do you want to rewrite your entire app.


People worry too much about that stuff. You can use non-maintained software for decades just fine. But I see people all the time freak out because there wasn't a release in the last week or whatever.

Also, most business fail way before their chosen framework stops being maintained. In fact, most businesses fail before they even got their first customer, let alone getting to break even. We need to keep some perspective here.


You assume that popular high school drama OSS is not productive and you don't get work done with it. Your assumption and the point you are making are incorrect.


It’s true that Django and especially DRF feel a bit overkill. But for any app that does actual business the extra bits have often saved my bacon.


Whenever you have “there is complex business logic that determines how SQL clauses are chained together” the Django ORM is invaluable.


DRF does what it says on the tin. It is REST by the definition of it. Not a HTTP JSON API but strict REST. A object with CRUD as an API. Everything else is outside of scope and mostly reall hard to do.

That's why I rarely use DRF and either use function based views directly or use another library.


In my experience, it was decent for simple CRUD interfaces, but anything beyond that turned the development into a nightmare.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: