Sequence diagram of UML learning notes

Source: Internet
Author: User
Tags dashed line
definition of sequence diagram:

Interaction is the behavior of a group of messages that interact with a set of objects that implement a goal in a specific context. Sequence diagram is a kind of interaction graph. A sequence diagram is a visual representation of the time order in which messages are routed between objects. Sequence diagrams describe the needs of use-case representations in more detail, translating them into further, more formal levels of fine-grained expression, which is one of the main uses of sequence diagrams. The purpose of a sequence diagram is to describe the interaction of individual objects in the system in chronological order.

In UML, a sequence diagram represents an interaction as a two-dimensional graph, in which the vertical is the timeline and the time extends downward along the vertical bar. Horizontal represents the role of a standalone object in collaboration. The role uses lifelines to represent, and when an object exists, the lifeline is represented by a dashed line, when the object is not active, and the lifeline is a double-lane when the object's process is active. As shown in the figure:

the role of sequence diagrams:

Identify and enrich a logical expression of context: A system's usage environment is a description of the potential use of the system, and a logic that uses the environment may be part of a use case or a control flow.

Refine the expression of a use case: one of the main uses of the sequence diagram is to translate the need for use-case expression into a further, more proven level of surprise expression.

Effectively describes how to assign accusations of each class and the reasons for each of these responsibilities: You can define the accusation of the class based on the interaction between the objects, and the interaction between the classes forms a specific use case. the composition of the sequence diagram:

Sequence diagrams are composed of objects, lifelines, activations, and messages. The purpose of a sequence diagram is to display the interaction between objects in a sequence of sequences that occur interactively.

object:

The concept of an object in a sequence diagram and an object in an object graph is an instance of a class. An object in a sequence diagram can be a participant in a system or any valid system object. If the object's starting position is placed at the top of the sequence diagram, it means that the sequence diagram has already existed at the beginning of the interaction, and if the object's position is not at the top, then the object is created in the interaction with Jiangbei.

Lifeline:

A lifeline is a vertical dashed line. Used to represent the existence of objects in a sequence diagram over a period of time.

activation:

Sequence diagrams can describe the activation of an object, which is the execution of an object operation, which represents the process by which an object completes its operation either directly or through a subordinate operation. Activation in a sequence diagram uses a slender rectangular box to indicate that his top is aligned with the activation time on it, while the bottom is in line with the finish time.

message:

The message is to send a signal from one object (the sender) to another or to several other objects (receivers), or to an object (sender or caller) to invoke the operation of another object (receiver).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.