序列图| 软件工程
什么是時序圖? (What is Sequence Diagram?)
Sequence Diagram is a "Connection Diagram" that represents a single structure or storyline executing in a system. It is the second most used UML diagram behind the class diagram. Sequence Diagram shows what message is to be sent and when.
順序圖是一個“連接圖” ,表示在系統中執行的單個結構或故事情節。 它是在類圖之后第二大最常用的UML圖。 序列圖顯示了要發送什么消息以及何時發送。
A sequence diagram is a good way to visualize and ratify various runtime framework.
序列圖是可視化和批準各種運行時框架的好方法。
順序圖 (Sequence diagram)
基本序列圖符號 (Basic Sequence Diagram Notation)
Lifeline: Lifelines are vertical dotted lines that indicate the object's activity over time. Lifeline is a named element that represents an individual participant in the connection. While parts and structural properties may have multiplicity, lifelines represent only one interconnected entity.
生命線 :生命線是垂直虛線,指示對象隨時間的活動。 生命線是一個命名元素,代表連接中的單個參與者。 盡管零件和結構特性可能有多種多樣,但生命線僅代表一個相互聯系的實體。
Messages: Messages are nothing but the arrows that represent calls between objects. Half-arrowed lines are used to represent asynchronous messages. Asynchronous messages are sent from an object that will not wait for a reply from the receiver before continuing its tasks.
消息 :消息不過是代表對象之間調用的箭頭而已。 半箭頭線用于表示異步消息。 異步消息是從對象發送的,該對象在繼續執行任務之前不會等待接收者的答復。
Execution Occurrence: Execution boxes present the time an object needs to complete a task. When an object is busy executing a process or waiting for a reply message, use a thin gray rectangle placed vertically on its lifeline.
執行發生 :執行框顯示對象完成任務所需的時間。 當對象忙于執行過程或等待回復消息時,請使用垂直放置在其生命線上的細灰色矩形。
Interaction Fragment: It is the named element that represents the most general interaction segment. Example of Interaction Fragment:
交互片段 :這是表示最一般的交互片段的命名元素。 交互片段示例:
- Occurrence
- Execution
- Interaction use
順序圖中的消息類型 (Types of message in sequence diagram)
Synchronous Message: It requires a response before the interaction can proceed. It's usually drawn using a line with a solid arrowhead pointing from one object to another.
同步消息 :在進行交互之前,需要響應。 通常使用帶有實心箭頭的線繪制,該線從一個對象指向另一個對象。
Asynchronous Message: It does not require a response before the interaction can proceed. It is usually drawn using an arrow.
異步消息 :在交互可以繼續之前,不需要響應。 通常使用箭頭繪制。
Reply Message: It is drawn by the dotted arrow moving backward to the original message.
回復消息 :由虛線箭頭向后移動到原始消息。
Self Message: A message sent to itself and it is represented by the U shaped arrow.
自我信息 :發送給自己的信息,用U形箭頭表示。
Found Message: A message sent from an unknown beneficiary, shown by an arrow from an endpoint to a lifeline.
找到的消息 :從未知受益人發送的消息,由從端點到生命線的箭頭顯示。
Lost Message: A message sent to an unknown beneficiary. It's shown by an arrow going from a lifeline to an endpoint, a filled circle or a cross(x).
丟失的消息 :發送給未知受益人的消息。 它由從生命線到終點的箭頭,實心圓或十字(x)表示。
簡單的端到端圖 (Simple E2E Diagram)
Image Reference: https://www.sparxsystems.eu/resources/project-development-with-uml-and-ea/interaction-diagram/
圖片參考:https://www.sparxsystems.eu/resources/project-development-with-uml-and-ea/interaction-diagram/
翻譯自: https://www.includehelp.com/basics/the-sequence-diagram-software-engineering.aspx
總結
- 上一篇: layui常用的表单标签_Layui常用
- 下一篇: Java类类getPackage()方法