Some monts ago, Greg Wilson and I talked about how nice it would be to be able to mix different kinds of model elements (as use cases, classes, states,…) in the same UML diagram.
This is specially useful when using UML as Sketch in order to communicate your design ideas with other members of the team.
It seems that now we have already a tool we could use for this purpose: Gaphor . Gaphor does not restrict the elements you can use in one diagram (if you know other similar tools please let me know).
I don’t see any inconvenient (and many benefits) in having this flexibility. Of course, the tool should also have the option of visualizing more “standard” views of the models (automatically derived from the elements specified in the mixed diagrams) for a more formal specification of the system in later phases (although I can think of some examples of mixed static-dynamic diagrams that would also very useful when implementing the system)
FNR Pearl Chair. Head of the Software Engineering RDI Unit at LIST. Affiliate Professor at University of Luxembourg. More about me.
I’m still hoping someone can show that drawing pictures using any particular modeling notation—even a mix of notations—actually makes development faster, cheaper, or more reliable than doing free-form sketching.
This sounds similar to what you do when showing in Google maps the street map on top of another view. On the one hand you get more information, on the other you get a much more complex model. Basically, you are using a combination of two or more languages (the viewpoint languages) and joinng them together. You can do that in UML because all viewpoint languages share a common (huge) metamodel. Also, UML allows you to do it because there is no clear separation between the languages (state machines, use cases, sequence charts) — the macro-metamodel contains the union of all of them. But in general I think that this may break the separation-of.concerns principle, and you may end up with models which are much more difficult to understand, debug, maintain or reason about…. Specially when there are no clear rules or operators for combining those languages. What would you think of mixing Java and COBOL languages in the same program? Or mezclando in la same frase Spanish e Ingles sin rule fija? You may end up mingling the two languages into the same model. This would indeed produce a new language, whose grammar would need to be defined — something not easy, nor even possible in some cases: think for instance in mingling the Java and COBOL programming languages, as before, or combining my two favourite programming languages: LaTeX and Excel 🙂 In case of UML, you get the macro-metamodel that hosts them all, but which has ended up being too large, too complex, too vague and too buggy…
Language combination is not an easy taks, and needs to be seriously taken. In general it is not just the union (or the intersection) of the metamodels of the languages to combine, and normally not apt for human consumption (but for tool consumption and handling).
So let’s be careful…
My two cents.
Antonio.