Ideally this is done via automatic code generation from the controller developed in step 2.
It does not address native code generation nor optimization.
To address this, reflection and/or code generation are utilized.
It certainly depends on the specific problem domain and how far code generation should be applied.
With native code generation, the performance difference will be much more significant.
However, this is not the same as an advanced version of code generation.
Both methods fall into the broader categories of code generation and automation.
This should also allow for better code generation and analysis.
I'm working on a project that involves code generation at the moment.
According to the vendor, the code generation has been completely re-written to this end.