Component Diagram

From Open Risk Manual

Definition

A Component Diagram is a structural UML diagram that provides a high-level, abstract view of a software system. It depicts how components are wired together to form larger components or software systems. A component diagram allows verification that a system's required functionality is acceptable (hence a useful communication tool with stakeholders).

A component is an independent unit that provides other components with services or uses the services of other components. Illustrating provided and required interfaces by the specified component is in the form of a rectangular compartments and connecting wires.

When specifying a component one can adopt one of two views:

  • the external view (black box view), which represents the specification of the component by means of its publicly visible Properties and Operations.
  • the internal view (white box view), which defines the implementation of the component exposing also its private Properties and Operations.


PlantUML Elements

A PlantUML components diagram specifies and shows the following:

  • Components
  • Interfaces


Example

@startuml
skinparam handwritten true


package "Some Group" {
  HTTP - [First Component]
  [Another Component]
}

node "Other Groups" {
  FTP - [Second Component]
  [First Component] --> FTP
}

cloud {
  [Example 1]
}


database "MySql" {
  folder "This is my folder" {
    [Folder 3]
  }
  frame "Foo" {
    [Frame 4]
  }
}


[Another Component] --> [Example 1]
[Example 1] --> [Folder 3]
[Folder 3] --> [Frame 4]

@enduml

Component Diagram

References