📜  序列图和活动图的区别

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

什么是序列图?

序列图只是按顺序描述对象之间的交互,即这些交互发生的顺序。我们还可以使用术语事件图或事件场景来指代序列图。序列图描述系统中的对象如何以及以何种顺序函数。这些图表被商人和软件开发人员广泛用于记录和理解新系统和现有系统的需求。

示例:基于情感的音乐播放器的序列图:

什么是活动图?

活动图基本上是流程图(统一建模语言)图,用于描述系统的动态方面。流程图表示活动从一个活动到另一活动的流程。活动可以描述为系统的操作。活动图中的控制流是从一个操作绘制到另一个操作的。此流程可以是顺序的、分支的或并发的。

示例:基于情感的音乐播放器的活动图

序列图和活动图之间的相似之处:

  • 序列图和活动图都是 UML 图。
  • 序列图和活动图都用于表示消息的控制流。

序列图和活动图的区别

Sequence Diagram Activity Diagram
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 Activity diagram represents the UML, which is used to model the workflow of a system.
The Sequence diagram shows the message flow from one object to another object. The Activity diagram shows the message flow from one activity to another.
Sequence diagram is used for the purpose of dynamic modelling. Activity diagram is used for the purpose of functional modelling.
Sequence diagram is used to describe the behavior of several objects
in a single use case
Activity diagrams is used to describe the general sequence
of actions for several objects and use cases.
Sequence diagram is mainly used to represent the time order of a process. Activity diagram is used to represent the execution of the process.