3 ms·
> You'd end up writing about the same amount of code that you'd have written with a standard REST-style interface. With every fad that has hit backend developm
by maratd 10y ago
> You'd end up writing about the same amount of code that you'd have written with a standard REST-style interface.
With every fad that has hit backend development, ORM/move-everything-to-frontend/merge frontend and backend a la Meteor/GraphQL/etc, there have been promises of simplicity and less code.
The problem, as you discovered, is that the overwhelming majority of non-CRUD code on the backend is directly related to security and cannot be abstracted away or moved anywhere else. You end up dancing the same dance, no matter what paradigm you use and some of them make that dance a bit more awkward.
Personally, I've settled on Swagger a few years back. There's no fancy paradigm, it's just plain REST with an open sec. Because you define your API ahead of time, you can automate CRUD, automate validation, testing, and documentation. All that's left is the nitty-gritty which you have to do no matter what and it doesn't have an opinion on how that should be done, that part is up to you.
- ruslan_talpa 10y agoit can be moved, to the database itself (constraints, grants)