The Unified Modeling Language User Guide SECOND EDITION [Electronic resources]

Grady Booch, James Rumbaugh, Ivar Jacobson

نسخه متنی -صفحه : 215/ 108
نمايش فراداده

Hints and Tips

When you create interaction diagrams in the UML, remember that sequence diagrams and communication diagrams are both projections on the same model of a system's dynamic aspects. No single interaction diagram can capture everything about a system's dynamic aspects. Rather, you'll want to use many interaction diagrams to model the dynamics of the system as a whole, as well as its subsystems, operations, classes, use cases, and collaborations.

A well-structured interaction diagram

  • Is focused on communicating one aspect of a system's dynamics.

  • Contains only those elements that are essential to understanding that aspect.

  • Provides detail consistent with its level of abstraction and should expose only those adornments that are essential to understanding.

  • Is not so minimalist that it misinforms the reader about semantics that are important.

When you draw an interaction diagram,

  • Give it a name that communicates its purpose.

  • Use a sequence diagram if you want to emphasize the time ordering of messages. Use a communication diagram if you want to emphasize the organization of the objects involved in the interaction.

  • Lay out its elements to minimize lines that cross.

  • Use notes and color as visual cues to draw attention to important features of your diagram.

  • Use branching sparingly; you can represent complex branching much better using activity diagrams.