UML Component Diagram Tutorial

A component diagram offers a view on a complex system. It depicts the interfaces provided and/or required by the parts of the system and the relationships between the parts. The parts are represented by components and other artifacts.

Component Diagram in UML

A component diagram is one of the UML structural diagrams. It shows a structure of modules within a system or between systems. It models interfaces between the system components - the interfaces required by components, the interfaces provided by components, and dependencies between the components and their interfaces.

UML Component Diagram
UML Component Diagram

What is a Component Diagram?

A component diagram is a high-level architecture diagram. It may be used for depicting the structure of component-based systems. Components can be grouped into bigger components. A component can consist of other nested components. Hierarchical structures may be created this ways.

What is a Component?

A component is an integral part of a system with a publicly defined interface, it may be a module, a program, a dynamically linked library, a subsystem, or a service.

What is an Artifact?

An artifact is a physical piece of information that is produced by a software system as a part of the modeled process. It can be a file, a document, a database table, an email message, or other types of textual or binary files. An artifact may consist of other artifacts.

What is an Interface?

An interface provides a list of public methods through which the systems can communicate. A system (or a component) provides an interface and another system (or a component) expects an interface of a specific type. Two systems that know this interface can communicate with each other without knowing their internal implementation or platform.

What is a Component Design?

A component design separates the reusable modules into components with well-documented interfaces. Components are reused within a larger system as an opposing to copy-paste programming. The particular components can produce and consume messages via events.

UML Component Diagram Overview

UML Component Diagram Overview
UML Component Diagram Overview

UML Component Symbols

Software Ideas Modeler offers tools for following elements of a component diagram:

  • Component
  • Port
  • Provided Interface
  • Required Interface
  • Collaboration
  • Artifact
  • Class
  • Interface
  • Association
  • Unidirectional Association
  • Bidirectional Association
  • Composition
  • Aggregation
  • Generalization
  • Realization
  • Abstraction
  • Dependency
  • Substitution
  • Containment
  • Connector

How to Draw a Component Diagram?

You can create a new component diagram in multiple ways:

  • Click on a Plus button in the tab switch bar, navigate to UML group and click on the UML Component Diagram item
  • Press CTRL+SHIFT+D, choose Component Diagram from the UML group, enter the name and click on the OK button.
  • Switch to Project tab in the ribbon and click on the Component Diagram item in the Content gallery.
  • Open Project sidebar, right-click on a project (or a folder) node, and in the Add Diagram submenu, choose UML Component Diagram.
Create a new UML component diagram
Create a new UML component diagram

UML Component Diagram Example

A component diagram for the student mark analysis system
A component diagram for the student mark analysis system

Comments

marwa 10 May 2020 22:34:07

components

Draw a component Diagram for the e-learning System which consists of the following components: 1- Student 2- Lecturers 3- Courses which consists of Exams, Files, and Assignment and they are all provide and required services from each other

New Comment

Comment