The output of the system design process is a component diagram.
We can think of the provided and required interfaces of a component as its external view.
During the component design process, the internal view of each component is derived.
The internal view of a component is called a collaboration.
A collaboration is a collection of classes, objects, or sub-components that work together to implement the component's interfaces.
Here's the UML notation:
See Components to review the definitions of component and collaboration.
See Classes to review UML class diagrams.
See Sequence Diagrams to review UML sequence diagrams.
See Design Patterns to review the basic concepts behind patterns.
A collaboration has two parts: a class/component diagram showing the relationships between the classes/ sub-components, and one or more sequence diagrams showing typical interactions between class/component instances.
Ideally, components should be easy to reuse and easy to extend.
As mentioned earlier, unrelated components can be realized by collaborations that instantiate the same design pattern.
Interestingly, two unrelated components can have similar internal designs. Over the years, programmers have formalized and cataloged these similarities. These catalogs can be very useful to software designers facing blank whiteboards.
Designing Components by Instantiating Patterns
Refactoring is the process of improving the design of a component (without changing its behavior).