Can you do 100% generation from UML models? <- Wrong Question!

From time to time we see a question like “Can I generate 100% of my code from UML models?” (e.g. here ). 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 obviuos 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 DSLs 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.
  • Try not to mix generated and manual code in the same artefact. It´s ok not to try to generate all the artefacts of your application from models but those that you do target, try to generate them completely. Otherwise the development process gets very complicated.

If you enjoyed this post you can subscribe to this Software Modeling blog , to the portal’s mailing list , follow me on  twitter, participate in the forums . And if you really liked it help me pass it on to others by bookmarking and sharing the post using the links below:

 

2 Responses to Can you do 100% generation from UML models? <- Wrong Question!

  1. [...] adopt a programming role AT SOME point. Again, this IS NOT necessarily a bad thing. I have argued before that you should use the RIGHT amount OF modeling FOR each [...]

  2. [...] Action Language: An OMG Journey Can you do 100% generation from UML models? <- Wrong Question! On the complexity of UML Google´s Christmas present: Canceling my AdSense [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress
More in code_generation, MDE, UML
Rules for Use Case analysis
UML 2.4 is out
On the complexity of UML
Close