I spent a lot of time thinking about this too at some point. It can be done but the problem is you don't solve the problem.
Now you have this elaborate tool that's going to get insanely complex if you want to really cover everything. You will be spending your time tweaking the generator's config files and adhering to its restrictions. I only made mine generate code for 1 language too, I couldn't even imagine trying to support multiple languages.
Eventually you're going to monkey patch in so many stupid rules because you run into sites that need something you didn't think of, and then it's going to get into this jumbled mess of insanity that makes you want to kill people whenever you use it.
The solution is to leverage your code editor and create snippets that get you 90% of the way. Now you have the annoying boiler plate out of the way but you have end points and their respective http handlers separate for each resource.
Now if you need something specific it's as simple as editing the resource that needs something specific and you don't have to worry about anything.
You trade in some code duplication for modularity and simplicity. I'm going to make this trade all day, especially when you can eliminate most of the grunt work with snippets in your editor.
You want to maximize productivity?
1. Make some snippets for whatever tech you use.
2. Create an extremely basic project skeleton and put this on github. Then clone it for new projects.
Now you have this elaborate tool that's going to get insanely complex if you want to really cover everything. You will be spending your time tweaking the generator's config files and adhering to its restrictions. I only made mine generate code for 1 language too, I couldn't even imagine trying to support multiple languages.
Eventually you're going to monkey patch in so many stupid rules because you run into sites that need something you didn't think of, and then it's going to get into this jumbled mess of insanity that makes you want to kill people whenever you use it.
The solution is to leverage your code editor and create snippets that get you 90% of the way. Now you have the annoying boiler plate out of the way but you have end points and their respective http handlers separate for each resource.
Now if you need something specific it's as simple as editing the resource that needs something specific and you don't have to worry about anything.
You trade in some code duplication for modularity and simplicity. I'm going to make this trade all day, especially when you can eliminate most of the grunt work with snippets in your editor.
You want to maximize productivity?
1. Make some snippets for whatever tech you use.
2. Create an extremely basic project skeleton and put this on github. Then clone it for new projects.
3. ??
4. Profit.