📜  序列图和协作图的区别

📅  最后修改于: 2021-09-10 02:49:28             🧑  作者: Mango

序列图是一个交互图,详细说明了所执行的操作。序列图捕获协作上下文中对象之间的交互。序列图以时间为重点,它们通过使用图表的纵轴来表示时间来直观地显示交互的顺序。

例子:

协作图表示对象的交互以执行特定用例或用例的一部分的行为。设计人员使用序列图和协作图来定义和阐明执行用例的特定事件流的对象的角色。

例子:

序列和协作图之间的相似之处

  1. 在统一建模语言中,序列图和协作图都用作交互图。
  2. 这两个图表都详细说明了系统的行为方面。

序列图和协作图之间的差异:

Sequence Diagrams

Collaboration Diagrams

The sequence diagram represents the UML, which is used to visualize the sequence of calls in a system that is used to perform a specific functionality. The collaboration diagram also comes under the UML representation which is used to visualize the organization of the objects and their interaction.
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.
The sequence diagram is used when time sequence is main focus. The collaboration diagram is used when object organization is main focus.
The sequence diagrams are better suited of analysis activities. The collaboration diagrams are better suited for depicting simpler interactions of the smaller number of objects.