- Code generation configurations
- Transformation configuration
- Code generation
A classic example of code generation can be seen in the Web Service field, there people use code generation to generate service and client code from a WSDL. In that case the configuration file would WSDL, and the transformation would be WSDL to Java, and transformation option would be, web service framework, language and etc..., and finally the output would the either or both service skeleton and the stub.
One other powerful use case of code generation is testing, specially in the process of staging testing, where we have some SLA to meet. We generate the code (scripts and configurations) and then measure the results, if it does not meet the expectation then we change the code generation configuration and re-generate the code and measure the results. We do this process until we get the expected results, doing this kind of process manually is so hard as well as error prone.
The most difficult part of the code generation is to identify the requirements including the input configuration and output format. Once we have that code generation is easy, and once we have the code generation tool, doing testing is so easy.
Most of the time what people do is do the experiments(testing) manually in a very small scale, and then use those code and configuration to build a code generation tool.