Could anyone explain me what is the difference between sequence diagram and communication diagram?
A communication diagram emphasizes the flow of messages through a set of objects, while the sequence diagram focuses on the time ordering of the messages that are being passed.
Differences Between Sequence and Collaboration diagram: The sequence diagram are used to represent the sequence of messages that are flowing from one object to another. The collaboration diagram are used to represent the structural organization of the system and the messages that are sent and received.
Can a sequence diagram be replaced by communication diagram? It is generally assumed that sequence diagrams and communication diagrams (formerly known as collaboration diagrams) are equivalent and could be converted into each other.
In sequence diagram lifeline the element exists and potentially takes part in the interaction. In communication diagram lifeline represents an individual participant in the interaction.
emphasizing the time ordering of messages (using sequence diagrams)
emphasizing the structural relationships among the objects that interact (using communication diagrams).
reference :UML user manual
Both diagrams give the same information, but the sequence diagram emphasizes time in its layout and the communication diagram emphasizes the objects that are communicating in its layout.
Time is implicit in sequence diagrams (it is inferred by vertical position), while it is given explicitly in communication diagrams (via numbers).
To quote Scott Ambler
The main difference between communication diagrams and sequence diagrams is that sequence diagrams are good at showing sequential logic but not that good at giving you a “big picture view” whereas communication diagrams are the exact opposite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With