Diagrams != Models

10th September, 2008 - Posted by rafael.chaves - 5 Comments

I often see the TextUML Toolkit being compared to tools that produce UML diagrams from textual descriptions. Examples of tools like that are ModSL, MetaUML and UMLGraph. But that doesn’t really make sense, and here is why: these tools produce diagrams from text. The TextUML Toolkit produces models from text. But what is the difference between models and diagrams?

According to Wikipedia:

  • A diagram is a 2D geometric symbolic representation of information according to some visualization technique.
  • A model is a pattern, plan, representation (especially in miniature), or description designed to show the main object or workings of an object, system, or concept.

Note that even though both terms are defined around the word “representation”, the term “diagram” implies graphical visualization, whereas the term “model” admits any kind of media, basically because models have no concrete form per se.

Now, please, if you are not convinced yet, read aloud 5 times: MODELS ARE NOT DIAGRAMS!

If that didn’t work, well, maybe the facts below will help:

  • models, not diagrams, are the subject matter of model-driven development.
  • models, not diagrams, can be validated.
  • models, not diagrams, can serve as input to code generation.
  • models, not diagrams, can be automatically generated from reverse engineering source code.
  • models, not diagrams, can be executed.

Even though diagrams are commonly used for representing models, they are not the only way, and non rare not the most appropriate one (yes, I am talking again about the virtues of textual notations, but I won’t repeat myself).

P.S. Maybe it helps adding to the confusion the fact that the TextUML Toolkit has an optional feature that will generate class diagrams automatically from the UML models created with it. However, that is just an optional, loosely integrated feature, and it is definitely not the Toolkit’s thing. Weirdly enough, from my observation, that feature is the main reason most people become interested in the TextUML Toolkit. Well, go figure.

Did you like this post? Read more posts like this in the Editorial category.


5 Comments


These are points I try to make on my “Diagrams Suck” slide. If you don’t like diagrams, don’t use them! Jeesh!!

Of course having a good textual alternative is key, so it’s great there are people like you working on that. And don’t forget, XML sucks too, perhaps even more than diagrams, so that’s not an acceptable alternative either! :-P


This is a very good point, which I’ve said before in less general way, “Drawing UML != Doing Modeling.”
If you want to read some more thoughts on DSL Modeling, check out these posts from our company blog:
http://www.skywayperspectives.org/blog/?p=46
http://www.skywayperspectives.org/blog/?p=1


Interesting posts, Eric, thanks for the links!


[...] call out models vs. views” – in other words, always keep in mind that diagrams != models. Models are the real thing, diagrams are just views into them. Models can admit an infinite number [...]


[...] diagrams != models, text != code (that would look good on a t-shirt!) [...]

Leave a reply

Name *

Mail *

Website