Model Driven Development in practice
Model Driven Development is an approach. It creates a long term profit by capturing the business knowledge into model artifacts. As more time invested on artifacts, software created based on them captures the domain better and software product's quality increases. Another important point here is that, this increase is independent from any key player domain expert. Because your organizations knowledge is not in the brain of any domain expert but in the model artifact they are creating together. In comparison this is a huge difference to classical development relying on a particular technology. Classical development points source code as source of domain knowledge. Now software developing organization has a possibility to create technology independent business value. Model Driven Development is not just for reducing the development time but also capturing the domain knowledge in a technology independent way.
In practice many developers came across with the term "Model Driven Development". According to my opinion same as in many other terms in software development, different stakeholders put different meanings on general terms according to their point of view. This term is also no exception for that.
Visionary Approach
A very visionary point of view would be:
- Transformation of expert knowledge into model artifacts to allow collaboration between domain experts and software developers.
- Model artifacts themselves are becoming more mature as the time they are developed and represent the business value.
- Organization developing the software can also profit from this by having resilience against continuous technology change.
- It is expected to reduce the effort of technology switch from technology A to technology B.
- Ideally this change will become only the effort required to create new "Generator Templates".
This is matching with the Object Management Group (OMG) Model Driven Architecture (MDA). Honestly it is hard to see or hear statements like this for an ordinary developer.
Less Visionary Approach
Another less visionary but more practical view would be:
- Profit of code generation is very attractive.
- Instead of coding high number of Java code we can use a tool to generate the code for us.
- This can boost our startup time for new projects and we can have a possibility to make rapid prototypes.
This is what you would expect to hear from your team manager / senior developer in your team in your daily life.
Pragmatist Approach
And here comes the lazy pragmatist developer:
- We created a small script so you can type your attributes as input and it automatically generates getter setters for you.
- You can paste the output into your source files (Java, C#, C++ etc.) and we are good to go.
A little more sophisticated version of lazy developer:
We are using "XYZ" framework to generate glue code in our projects.We have templates developed / hacked / busted for generation of some stuff like:- getter/setters
- operations which are boring to code such as input validation
- stuff that you should make in each of the API calls as a welcome ceremony to new request
- ...
This is what happens if we put the code generation only as a way to profit from code development time or precisely code typing time.
Short term gains are obligatory to survive in competition
Depending on their interest and knowledge different people understand and expect different advantages from Model Driven Development. Most of the organizations are mainly focusing on the short term profit that they can gain. In practice, Model Driven development tools are finding themselves in a world, where they need to compete with other development frameworks. In those frameworks some sort of code generation is also involved to reduce development time of a software product. However without a visionary point of view as mentioned above, it is hard to capture the main long term profit of the Model Driven Development.
Creation of a business knowledge about the problem in a technology independent way is the main long term profit as mentioned earlier. Personally this is what I found most attractive about the Model Driven Development. However, a model driven development tool needs to bring some short term profits such as rapid code generation along with main long term profits to be able to survive in a competition. This is also a prerequisite to be able to come into new technology radar of many software organizations.