Sequence versus collaboration diagrams

Sequential and collaboration diagrams are semantically equivalent. They express the same thing: The interaction between objects. It is easy to convert one diagram to the other, as they present the same information. Some UML software, such as Rational Rose, provide automatic conversion from one diagram to the other.

Although both diagrams present the same information, they do not visualize the same information. Sequence diagrams are used when modeling a flow of control over time and when it is important to represent the messages passed between objects, as they unfold over time. Therefore, sequence diagrams are very useful to describe use case scenarios.

Collaboration diagrams are used when modeling a flow of control by organization and when it is important to emphasize in the structure of the relationships between objects and in the totality of messages an object may receive. Therefore, collaboration diagrams are used to build class and object behavior.

0 0

Post a comment