Author Topic: Using an element more than once on a diagram  (Read 4230 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8204
  • Karma: +193/-23
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Using an element more than once on a diagram
« Reply #30 on: November 04, 2009, 10:58:46 pm »
Quote
UML does not require multiple renditions of the same classifier in a diagram as a compliance requirement.  
AFAIK OMG does not have any compliance requirements regarding the support of UML.

Geert

beginner

  • Guest
Re: Using an element more than once on a diagram
« Reply #31 on: November 04, 2009, 11:15:13 pm »
s-o-s is right and EA should be corrected in that respect. But even then it would be possible to create your nasty diagram above in EA as this representation is silent about the namespace. All of the C1's could come from different namespaces which would not be visible in the diagram.

From my intentional perspective: how could I show that (e.g.O) two of the C1's are just rendered twice for convenience and another one is indeed from another namespace?

b.
« Last Edit: November 04, 2009, 11:23:53 pm by beginner »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8204
  • Karma: +193/-23
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Using an element more than once on a diagram
« Reply #32 on: November 04, 2009, 11:20:00 pm »
the "from <packagename>" already helps, although we all agree that that should be "from <namespace>"
I think that is an option you can turn on/off somewhere, but I don't remember which one it is.

Geert

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Using an element more than once on a diagram
« Reply #33 on: November 05, 2009, 08:15:14 am »
Hi,

[off_topic]
Quote
The Dark Force is always south of the "Weißwurschtäquator"

And sorry for emphasizing THIS way. The circuit for bold face on my VT100 is defective.
Yes there are lot of adepts following the temptations of 'The Force's dark side, here beyond the outer rim (:= south of the "Weißwurschtäquator"). But there's still a handful of honest and righteous jedi rebels, like me, striking back on them. And they get weaker and weaker with every election.  ;D

BTW that you still use a VT100, convinces me somehow that its true what they say: The technologies are more evolved and innovative here in the south.
[/off_topic]
OK, enough off topic now (not all of the world citizens reading here may understand our german sense of political humor).

Except Geerts mentionings of UML as base of other MLs, and being too restricted by UML already (I personally think it's vice versa, the UML metamodels leave to much room for misinterpretations in some cases), I believe the most natural reason, why one may want to have an element ('Simple Link') more than once on a diagram is to avoid or resolve some connector links' crossings.
This is likely to happen if you're showing diiferent types of connectors (e.g. Generalization and Association links) on the same diagram. If this happens to me in general, I'm starting to think thoroughly, how to change my design to avoid the crossings. If I come to the conclusion, that the design is OK, I will usually factor out the crossing connectors to another view (diagram) of the same model, at least if the line style of the connectors is the same (so doing that for crossings of Dependency and Association links is not coercively necessary, I believe).

Sometimes I came over situations, where I wished to have s.th. like the good old 'program flow' diagram's connector bullet in UML. For refreshment: That thingey allowed you, to specify a numbered bullet at the end of a connector and it's counterpart onto another connectors end to express they're repsesenting the same connector. These could be used in either a single or on two different diagrams. Sometimes this helped to keep the essential information on a diagram, without spilling the visual form with crossings. But anyway, they also may help hiding design flaws of the model more easily.

All these rules I've mentioned above focus on the readability of diagrams for humans, yes! For other interactions with the UML model, diagrams play no prominent role anyway, IMHO.

Regarding bruce's sample of EAs possibility, to have elements with the same name on the exactly same level, I think that's a completely different kettle of fish. I would simply stick with KP's advice: Don't do that! Despite I see also situations where this could be useful, but only for illustrative diagrams. E.g. I have drawn some diagrams to illustrate the GoF design patterns as they're shown in the original book. These use somtimes '...' to show that analogous elements may be added to the structure. I don't see any reason why '...' as classname shouln't appear more than once in the same diagram, usually these will be distinguishable having different parent classes.

Just my 0.02 EUR

Günther
« Last Edit: November 05, 2009, 08:17:48 am by g.makulik »
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/