Introduction to the

Sequence Diagram, also known as Sequence Diagram, Sequence Diagram or Sequence Diagram, is a KIND of UML interaction Diagram.

It shows dynamic collaboration between multiple objects by describing the chronological order in which messages are sent between them.

Can show interaction order, chronological order, concurrent process

The sequence diagram is divided into two directions: horizontal (objects) and vertical (time axis). The solid and dotted arrows in the middle represent between objectsPass the message to call the method.

Messages are passed horizontally between objects, arranged vertically in chronological order

The six elements of the sequence diagram

Roles: people, systems, subsystems, etc

Objects: Objects represent the roles that objects in the sequence diagram play in the interaction

Lifeline (timeline) : Represents the life time of the object

Control focus/activation: a symbol for a period of time, represented by a small rectangle, during which an object is activated to perform an action

Messages can be divided into synchronous messages, asynchronous messages, return messages, and self-associated messages

Self-associated message: This object invokes its own methods

fragment

Fragments should be used to distinguish between conditions required to invoke a method, not to determine events after a method is invoked

Alt (judge)

Loop (loop)

Opt (switch)

Par (parallel)

Dashed line: the lifetime of the object

The sample