Collaboration diagram

 

  Collaboration Diagram ( also called Collaboration Diagram ) is an interaction diagram that emphasizes the organizational structure between objects that send and receive messages . A collaboration diagram shows a series of objects and the connections between these objects and the messages sent and received between the objects. Objects are usually instances of named or anonymous classes , but can also represent instances of other things, such as collaborations, components , and nodes. Use collaboration diagrams to illustrate the dynamics of the system.

      A Collaboration Diagram shows an interaction diagram of how a group of objects cooperate with another group of objects for a system event described by a use case . Use collaboration diagrams to show relationships between object roles, such as a set of messages exchanged between objects to achieve an action or achieve a result. If you need to emphasize time and sequence, it is best to choose a sequence diagram ; if you need to emphasize context, it is best to choose a collaboration diagram.

      Collaboration diagrams are used to show how objects interact to perform the behavior of a specific use case or a specific part of a use case. Designers use collaboration diagrams and sequence diagrams to identify and clarify the roles of objects that perform a specific flow of events for a use case. They are the primary source of information for determining class responsibilities and interfaces.

      Unlike sequence diagrams, collaboration diagrams show the relationships between objects. Sequence diagrams and collaboration diagrams represent similar information, but in different ways. Collaboration diagrams show the relationships between objects, it is better for understanding all the effects on a given object, and it is better for process design.

      The format of collaboration diagrams makes them more suitable for use in analysis activities (see Activity: Use Case Analysis). They are particularly suitable for describing simple interactions between a small number of objects. As the number of objects and messages increases, understanding collaboration diagrams becomes increasingly difficult. Furthermore, it is difficult for collaboration diagrams to display supplementary descriptive information such as time, decision points, or other unstructured information that can easily be added to annotations in sequence diagrams.

      Collaboration diagram emphasizes participating in the organization of an interacting object, which consists of the following basic elements: Actor, Object , Link, and Message. In UML , a connection between two objects is marked with a solid line,

      A message in a collaboration diagram, represented by a marked arrow above a connection. Collaboration diagrams contain classifier roles and association roles, not just classifiers and associations. Classifier roles and association roles describe the configuration of objects and the connections that may arise when a collaborating instance executes. When collaborations are instantiated, objects are restricted to classifier roles and connections are restricted to association roles. Association roles can also be filled by various temporary connections, such as process parameters or local process variables. A connection symbol can use a stereotype to represent a temporary connection ("parameter" or "local") or to invoke the same object ("self"). While there may be other objects throughout the system, only those involved in collaboration are represented. In other words, collaboration diagrams only model objects and their associations that interact with each other, while ignoring other objects and associations.

 

Contents of Collaboration Diagrams

      A collaboration diagram can have object and actor instances, as well as connections and messages that describe the relationships and interactions between them. Collaboration diagrams describe what happens among participating objects by illustrating how objects communicate by sending messages to each other. You can make a collaboration diagram for each variation of the use case event flow.

      A collaboration diagram depicting part of the flow of events in the Receive Storage Items use case of the Recycler System.

      In a collaboration diagram, you can use objects in the following ways:

      · The class of the object may not be specified. It is common to make collaboration diagrams with only objects before specifying their classes. 
      ·   Objects can be named, but if you want to distinguish different objects of the same class, you should name them. 
      ·   If the class of the object actively participates in the collaboration, the class itself can be represented in the collaboration diagram.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327018359&siteId=291194637