UML Diagrams

What is the difference between sequence diagram and collaboration diagram? Can a sequence diagram be replaced by collaboration diagram?

Showing Answers 1 - 3 of 3 Answers

Dusan B

  • Nov 2nd, 2007
 

Sequence Diagrams (Message Sequence Charts) and Collaboration diagrams have a one to one relationship. Given a MSC you can easily convert it into a Collab. diag. and vice versa. However, the form in which you choose to present them offers advantages and disadvantages.

Collaboration Diagrams are useful for short interactions - too many interactions clutter up the diagrams and the diagram just becomes impossible to follow. However, for short interactions they take up less space and can give a more compact view of the system.

MSC are useful for long interactions, because they're not limited in space. If your interactions go on and on, you just keep adding them to the bottom of the diagram. This kind of interaction represented in a collab diagram would be difficult to follow.

So basically, as a general rule, short interactions (a few messages, maybe up to 7-8) are easily and nicely represented in a Collaboration diagram, otherwise, use an MSC.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions