3 ms·
Django Rest Framework is getting close to that.
by iliaznk 8y ago
Django Rest Framework is getting close to that.
- nnq 8y agoHuh?! 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...
- iliaznk 8y agoWell, 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.
- iliaznk 8y ago> 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.