From time to time we see a question like “Can I generate 100% of my code from UML models?”. The answer is YES but to me, this is the WRONG question.

Sure, you can generate every single line of your application code from your UML models (if you think UML is not expressive enough take a look at UML Executable), however, to me, the important question is:  when is it worth to do it? .

Specifying a UML model precise enough to represent your full application behaviour is very time-consuming so it’s not obvious when this is the most productive way to proceed. I don´t think anybody can give a clear answer to this. There are many factors to consider like the benefits of models when maintaining the application in the future; also the use of Domain-Specific Languages instead of UML could bring productivity improvements in some domains.

However, what I do believe is that:

  • 20% of the modeling effort is enough to generate 80% of your application (my Pareto principle for MDD ). Therefore, at least this 20% of modeling IMHO is completely worth it.
  • Try not to mix generated and manual code in the same artifact. It’s ok not to try to generate all the artefacts of your application from your models but those that you DO target, aim to generate them completely. Otherwise, the development process gets very complicated.
It’s better to complete 100% of 8 things than of 80% of 10 things - Dave Kellogg <- same applies to code generation! Click To Tweet
Want to build better software faster?

Want to build better software faster?

Read about the latest trends on software modeling and low-code development

You have Successfully Subscribed!

Pin It on Pinterest

Share This