In UML modeling, components are model elements that represent independent, interchangeable parts of a system. They conform to and realize one or more provided and required interfaces, which determine the behavior of components.
Components make a system more flexible, scalable, and reusable.
In models that depict executable systems, components represent the components that are used during the execution of the system. Examples include COM+ objects, JavaBeans™, and Web services.
A component usually takes the name of the part of the system that it represents.
As the following figure illustrates, a component is displayed in the diagram editor as a rectangle that contains the name of the component. It also contains a stereotype of «component» or a component icon, which is a box with two small rectangles that protrude from its side.
Compartments are used to display information about the component’s attributes, operations, provided interfaces, required interfaces, realizations, and internal structure.
Parent topic: Component diagrams