Thesis - Code Generation for Spring with OAW
Back in July 2008 I finished my thesis, here are some theoretical details about it...

The main goal of my thesis was to implement a full scale Spring-Architecture using the Model Driven Architecture approach.

The thesis was innovative back in 2008, since there was not a single scientific work that executed a full model to model and a model to code transformation.

My main influences back there were Markus Voelter and some great developers at itemis, a company that focused on model driven generation approaches. I want to thank all the developers who touched this topic with me at this time and gave me practical and theoretical input.

What is a classical spring architecture? Well this is the best practice setup known to the developers and architects. The first sketches for this can be found in the Rod Johnson books about the spring.

I sketched it in my theses like this...
Classical spring architecture back in 2008, my won graphic.
Since there was barely any code generation back in 2008 inside the spring framework, but we had a consistent pattern for each entity CRUD cycle, it made a lot of sense to generate the according architecture out of a given UML model.

The OAW framework came on the horizon with great capabilities for textual editors inside the Eclipse IDE and brought up a way to practically implement it.

What was still kinda missing though is the part of the model to model generation. The motivation behind this is to abstract the business domain from the technical domain on the level of UML models and this was part of my thesis.

Here is the classical two model approach that I implemented...
Specifically interesting was the resulting text editor inside the Eclipse IDE as well as the amount of the generated code, just out of one textual model. As you can see I was able to have a domain specific language defining UML level models but in pure text. This is very useful for source code management systems and merging steps with the team.
Core textual model, as input for the whole stack generation
Code autocomplete within the editor.
Finally the generated code amount was tremendous and covered the best practice spring architecture...
If you want to dive deeper into my theses you can download it here completelly, its in German.
So what can I say after 15 years after I wrote it?

The spring architecture is still the same with some variations.
I never worked with model driven generation after it since I went to the e-commerce space. The current spring features completely generate the database layer, as far as I have seen. Convention over configuration took away a lot of needed configuration effort and makes code generation also obsolete for a big part...

I still see a good usability case specifically for the OAW tooling like xtext for very complicated business domains, e.g. electronics. In this case the domain expert can hard code an editor to support the software engineers in their work.
Made on