A collaboration is a mechanism composed of structural and behavioral elements. Collaborations provide an organization mechanism, but unlike packages they have an identity and a semantic scope. A given element may play a role in several collaborations.
A collaboration includes two types of construction: a context, which is composed of a description of the static structure of the objects being considered, and an interaction represented by a sequence of messages exchanged by these objects. The two viewpoints are necessary to document the behavior completely, but each viewpoint may be displayed independently.
Collaborations are used, depending on their level of detail, to describe specifications and express implementations. The table below summarizes the model elements that may be described by a collaboration:
Specification | Type | Operation | Use case |
Implementation | Class | Method | Use case implementation |
Collaborations also exist in a generic form (model), parameterized by classes, associations, attributes, and operations. A generic collaboration is called a pattern, or a scheme. Patterns always have a name, in contrast to collaborations that may remain anonymous.
Simplified metamodel representation of collaborations
An interaction expresses the behavior resulting from the collaboration of a group of instances. An interaction may be displayed with respect to the time perspective (by sequence diagrams), or with respect to the space perspective (by collaboration diagrams). Interactions comprise the following main elements:
Simplified metamodel representation of interactions.
© 1997 Editions, Eyrolles, Paris, France . All rights reserved.