by dpix on 8/14/19, 9:03 PM with 5 comments
Our current process for building these out is to build a swagger definition with a mock service backend in js to unblock upstream clients like web and mobile. From there we go an implement the real API in python/flask with postgres.
It got me thinking that probably 80-90% of all the code written for the real API is boilerplate setting up models, db migrations, routes, controllers, authentication etc.
I am imagining that a fair bit of this could be automated, all you really need is a modal definition, and you could generate all of the above, abstracting all that away from the engineer. Providing hooks for inserts and updates would allow for custom business logic to slot in, and would be all the real code engineers would need to write.
What else am I missing that backend developers would want from a framework (or managed service) like this?
by xq3000 on 8/15/19, 12:10 AM
However, this approach usually doesn’t work for more “system” level products.
Check out Model-Driven Architecture [1]. Most likely you’ll be able to configure an MDA toolchain to generate the code you want
[1] MDA https://en.wikipedia.org/wiki/Model-driven_architecture