Create a UML component diagram

Show me an example

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.
  2. In the tree view (tree view: Displayed in a window in the UML Navigator, a hierarchy in which each UML element or view (diagram) is represented by an icon. The UML template automatically creates a tree view of your model.), right-click the package or subsystem in which you want to include the component diagram (component diagram: An implementation diagram that shows the structure of the code itself. From a component diagram, you can learn about compiler and run-time dependencies between software components, such as source code files or DLLs.), and then on the New menu, click Component Diagram.

A blank page appears, and the UML Component stencil becomes the top-most stencil. The workspace displays 'Component' as a watermark. An icon representing the diagram is added to the tree view.

 Note   If the tree view isn't visible, point to View on the UML menu, and then click Model Explorer.

  1. Drag a Component shape onto the drawing page for each component you want to represent.
  2. Where appropriate, drag an Interface shape onto the drawing page and glue the endpoint without the circle to a component shape.

ShowAdd an interface to a class, component, or other elements

  1. In a static structure (static structure diagram: A diagram that shows the static structure of a model; that is, the elements that exist (such as classes and types), the internal structure of the elements, and their relationships to one another.), component (component: In component and deployment diagrams, a distributable unit of implementation in a system. For example, a component can represent a physical module of code (source, binary, or executable) or a business document in a human system.), or deployment (deployment diagram: An implementation diagram that shows the structure of a run-time system. From it, you can learn about the physical relationships among software and hardware components and the distribution of components to processing nodes.) diagram, drag the lollipop Interface shape onto the drawing page.
  2. Glue the endpoint without the circle to a connection point Connection point image - blue X on the class (class: In a static structure diagram, a set of objects with similar structure, behavior, and relationships. Classes are declared in class (static structure) diagrams and represent concepts in the systems being modeled.) component, or other element.
  3. Double-click the Interface shape to add a name, operations, and other property values.

ShowTips

You can also represent an interface with a rectangular Interface shape that resembles a class. Use this shape when you want to display a list of the interface operations.

To change the type of shape that displays for an interface, right-click the Interface shape and click Show as Class-like Interface or Show as Lollipop Interface.

  1. Use Dependency shapes to indicate the relationships between components or between one component and another component's interface.

ShowIndicate a dependency relationship between UML elements

  1. Drag a Dependency shape from the UML Static Structure, UML Deployment, or UML Component stencil onto the drawing page and place it near the elements you want to relate.
  2. Glue the endpoint with an arrowhead to a connection point Connection point image - blue X on the element the other element depends on. Glue the endpoint without an arrowhead to a connection point on the element that depends on the other element.
  3. Double-click the dependency to add a name, stereotype (stereotypes: A representation of a usage distinction. A stereotype is a subclass of an existing element with the same attributes and relationships as that element but with a different intent and possibly additional constraints.), and other properties.

 Tip   If you want to indicate a trace (trace: A kind of dependency that indicates a historical relationship between two elements that represent the same concept at different semantic levels or from different points of view.), refinement (refinement: A kind of dependency that indicates a historical or derivation relationship between two elements with a mapping between them. A description of the mapping may be attached to the dependency in a note.), usage (usage: A kind of dependency that indicates that one element requires the presence of another element for its correct implementation or functioning.), or binding (binding: A kind of dependency that indicates a binding of parameterized class, or template, parameters to actual values to create a bound, or nonparameterized, element.) dependency, you can use the Trace, Refinement, Usage, or Binding shapes from the UML Static Structure stencil.

  1. Double-click any shape to open its UML Properties dialog box where you can add a name, attributes, operations, and other properties.
  2. Save the diagram.
 
 
Applies to:
Visio 2007