uml--sequence diagram and collaboration diagram

Source: Internet
Author: User

Main content:

1. Sequence diagram and collaboration diagram.

2. Drawing (computer room charge system).

3. A simple relationship between two diagrams.


Body:

1. Sequence diagram and collaboration diagram

Sequence diagram

(1) Understanding the sequence diagram:

Sequence diagrams are used to denote the order of behavior in a use case, and when a routine is executed, each message in the sequence diagram corresponds to a class operation or event that initiates a transformation in the state machine.

Sequence diagrams are interactive diagrams that emphasize the chronological order of messages. It describes the interactions between objects that occur in the event flow of a scene or use case.

The focus is on the message sequence, which describes how the objects are sent and received, showing the order in which messages are sent.

Sequence diagram is characterized by clear, a well-designed sequence diagram from left to right, from top to bottom can well represent the flow of system data, for the next system design to pave the way.

Ways to browse the sequence diagram: View messages from top to bottom for interacting between objects.

(2) The contents of the sequence diagram:

(3) Several message forms:

Call (Invoke), return (return), send (send), create (creation instance), Destroy (destroy instance)


Collaboration diagram

(1) Understand:

Collaboration diagrams are also interactive charts. They also pass the same message like a sequence diagram, but they don't care when the message is passed, only the role of the object. In a sequence diagram, the role of the object is placed on top and the message is the connector line. It is an interaction diagram that emphasizes the organizational structure between the objects that send and receive messages. A collaboration diagram shows a series of objects and the connections between them, as well as messages sent and received between objects. Objects are typically instances of named or anonymous classes, and can represent instances of other things, such as collaboration, components, and nodes. Use a collaboration diagram to illustrate the dynamics of the system.

(2) things in the collaboration diagram:

(3) Relationship:

Link: represented by a line, a link representing two objects sharing a message between objects or between actors and objects.


2, computer room charge system sequence diagram and collaboration diagram

Sequence diagram

General User Balance query:


Operator Registration:


The administrator sets the basic data:


Collaboration diagram

General User Balance query:


Operator Registration:


The administrator sets the basic data:




3. The simple relationship between the two graphs:

Class diagrams and object graphs are views of the static model. Interaction diagrams (including sequence diagrams and collaboration diagrams) are dynamic. They all describe the interaction between objects. In object-oriented modeling, there are activity diagrams, state diagrams, sequence diagrams, and collaboration diagrams to establish behavior interactions between behaviors.

Contact: Both describe the interaction between the objects, and the two graphs can be converted to each other.

Difference: The focus is different. The sequence diagram clearly indicates the chronological order (emphasis time) in the interaction, but does not explicitly represent the relationship between the objects. Collaboration diagrams clearly represent inter-object relationships (emphasizing space), but do not have a clear chronological order.

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.