Collaboration diagram of UML

Source: Internet
Author: User

Collaboration diagram of UML


Collaboration Diagram--communicationdiagram

also called co-operation diagram, is an interaction diagram (Interactiondiagram).

The emphasis is on the organizational structure between the objects that send and receive messages, and a collaboration diagram that shows a series of objects and the connections between them, as well as the messages sent and received between objects.

also called "Communication Diagram", "collaboration" as a structural thing used to express the static structure and dynamic behavior of the concept of a combination of expressions of different things to work together to complete a complex function.




Description of the collaboration diagram

A collaboration diagram shows a group of objects, how to collaborate with another set of objects in order to be a system event described by one use case.

objects are typically instances of named or anonymous classes, and can represent instances of other things, such as collaboration, components, and nodes, using a collaboration diagram to illustrate the dynamics of a system, which makes it easy to describe complex program logic or multiple parallel transactions.

A collaboration diagram is a graphical representation of the related interactions between objects, and can also have hierarchies. Multiple objects can be used as an abstract object, through decomposition, using the lower-level collaboration diagram to express the collaboration between the multiple objects, which can alleviate the complexity of the problem.

using the ER to draw collaboration diagrams, select communication such as:




components of a collaboration diagram

The collaboration diagram emphasizes the organization that participates in an interaction object, which includes the following elements: The actor, the object, the link, and the message.

object: Represents an object with a rectangular frame.

Connect: Marks the connection between two objects using a solid line.

message: indicated by a labeled arrow labeled above the connection.


When a message is passed between two objects, the two objects are connected with a forward edge with arrows, and in UML, the semantics of the collaboration diagram are equivalent to the sequence diagram.

The direction of the arrow pointing to the edge indicates the direction of the message being passed, what message is identified above the forward edge, the time sequence in which the message is sent, and the number appended to each message, and it is clear that the collaboration diagram makes it easy to describe the collaboration between objects. There is no need for a sequence diagram to correspond to a single scene, you can describe the collaboration in multiple scenes all at once, but, as with the sequence diagram, in the UML collaboration diagram, a description of the message delivery condition is also specified.




The collaboration diagram contains the class meta and association roles, not just the primitives and associations, and the class Meta roles and association roles describe the configuration of the object and the connections that may occur when a collaborative instance executes.

When the collaboration is instantiated, the object is limited to the class meta role, the connection is limited to the associated role, and the associated role can be assumed by various temporary connections, such as process parameters or local process variables, which can be used to represent temporary connections ("parameter" or "local" ) or call the same object ("self").

Although there may be other objects throughout the system, only objects involving collaboration can be represented, in other words, the collaboration diagram only models the association between objects interacting with each other and ignores other objects and associations.




The relationship between collaboration diagram and sequence diagram

A collaboration diagram is used to represent message transactions between objects.

Although a sequence diagram can represent the collaborative action of an object on a certain definition, it can clearly describe the collaborative relationship between objects or collaboration diagrams.

collaboration diagrams can be used to show relationships between object roles, such as a set of messages exchanged between objects to achieve an action or a result, and if you need to emphasize time and sequence, it is best to select a sequence diagram, preferably a collaboration diagram if you need to emphasize context-sensitive.


collaboration diagrams are used to show how objects interact with each other to perform specific parts of a particular use case or use case, and the designer uses collaboration diagrams and sequence diagrams to identify and articulate the roles of the objects that perform the specific event flow of the use case, which is the primary source of information used to determine the responsibilities and interfaces of the class.

Unlike sequence diagrams, collaboration diagrams show the relationships between objects, and sequence diagrams and collaboration diagrams describe similar information, but in a different way, the collaboration diagram shows the relationship between objects, which is more conducive to understanding all the effects on a given object and more suitable for process design.


The format of the collaboration diagram determines that they are more suitable for use in analysis activities.

They are particularly well-suited to describe simple interactions between small numbers of objects, and as the number of objects and messages increases, it becomes increasingly difficult to understand collaboration diagrams, and collaboration diagrams are difficult to display supplemental descriptive information, such as time, decision points, or other unstructured information, In a sequence diagram, this information can be easily added to comments.


Collaboration diagram of UML

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.