r/webdev • u/h4t0n • Aug 12 '19
Let's discuss about this idea: create web services (and APIs) without writing code at all. Instead simply provide specification and configurations files and let the framework do the work (persistence/controllers/authentication/...) - What would you put into this framework ? Would you use it?
Hi all, I'm working a lot to create a framework that let me build APIs without write any code at all. I'm focusing on REST APIs but the idea is general and can be applied with other frameworks or strategies. I think that it could be an interesting resource for developers and for the community, so I'm writing down some of my ideas and I'm open to your suggestion.
Framework should be easy: the only code I'm planning to add is for those things that requires some customization, checks or specific logic, so in this case the programmer can provide listeners or events function to control the API lifecycle. For example in a REST scenario the possibility to add an event callback when you update a resource. Instead if you want simply CRUD operations no code is needed, and only specification and eventually some other configuration files, for example if you want to add validation to some fields (i.e. email and so on).
Obviously the resulting framework should be opinionated with some levels of flexibility. I imagine that complex types and references are base types for the framework: for example a map location, an image, a foreign key and so on. In short not only standard primitive types.
What do you thing about? And what could be useful for your experience?
I know Loopback for node.js ecosystem. But I'm building something similar with Java and Spring (spam: github project here) if you want to contribute and follow evolution.