3 ms·
Completely agree. I like to design systems in that order : 1. my data model ( database schema ), because it gives you good questions to ask regarding the busi
by bsaul 7y ago
Completely agree.
I like to design systems in that order :
1. my data model ( database schema ), because it gives you good questions to ask regarding the business side of your problem and let you go very deep just by asking « for each a, how many bs can we get »
2. my external api. Because it requires you to « dumb down » your problem, and see which part of your model you want to expose and how.
3. I actually start coding my business process, and then bind them to the model on one end and api on the other
If i were to use code generation tool, it would need to generate both the db and the api stubs, together with the correct information exposure. I’m not aware of any tool that would let you do that.
- encima 7y agoOpenAPI and RAML both have some pretty cool tools to generate both the DB and the API stubs. For OpenAPI, Connexion by Zalando is one of the best implementations I have used. You just need to write the logic and provide the API spec.
- heavenlyblue 7y agoSo I assume you do most of the serialization of deserialization of objects by hand in connexion?
- encima 7y agoMostly, yeah. It is not perfect but we have a helper library we have written that handles most CRUD operations for objects and Connexion does the validation.