Hacker News new | ask | show | jobs
by v3ss0n 819 days ago
DRF is horrible
2 comments

I don't think one should write APIs in Django. It's layer upon layer upon layer on top of a framework that wants hierarchical models and views, and you have to bend backwards to put a slightly more complex data model in it, and then another time to write all the hooks to make it fit the API. It's like paint by numbers for software engineering.
You have to know what DRF is good for, and what doesn't fit well with it. Because DRF is on top of Django (one layer not many layers), you can always fall back to a function that takes a request and returns a response. You can also fall back to SQL instead of the ORM.
I've been using Django for about 5 years and I've never bothered with DRF or even the ORM. Pure SQL and function-based views works just fine
Because ... ?