Hacker News new | past | comments | ask | show | jobs | submit login

Huh?! Any moderately complex usage of DRF requires tons of boilerplate, or ton of app-specific abstractions... Also, just having to write a view, then a serializer... to actually write it!!

Imho the ideal framework would work with a models definition, json or yaml, not code, with extra anatotions for everything needed to have the logic of stuff like serializers and views instantiated from them. And keep the "custom behaviors" code fully separate from this models config, preferably in some modules with stateless and mostly pure function, sort of the serverless mindset, and not too much oop bullshit on top.

Rails and all the frameworks that copied it (Django, Laravel etc.) set a really bad example imho...




Well, of course complex and specific stuff will require more boilerplate, but if you just need a basic CRUD on a model – just define a view set and you're done, URLs and methods will be created automatically.


> json or yaml, not code only to sooner or later realise that those definitions have turned into a DSL – or code, for that matter, anyway.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: