Component Diagram Tutorial - Visual Paradigm Online

Logo of Visual Paradigm Online
  • Product
    • Create
      • Diagram
      • Chart
      • Smart Board
      • Form Builder
      • AI Chart
      • AI SmartBoard
    • Compose
      • Graphic Design
      • Flipbook
      • Animation
      • Photobook
      • PDF Editor
      • Collage
      • Document
      • Spreadsheet
      • Presentation
    • Tools
      • PowerPoint Web Viewer
      • AI Image Translator
      • PDF Tools
      • File Converters
      • Photo Effect Tools
      • Agilien
      • Canvas
    • Essential
      • Publishing

        Turn your results into flipbooks, slideshows, or videos, and display them on a virtual bookshelf.

        Learn More
      • AI Tools

        Unlock AI-powered tools that simplify tasks and boost productivity.

        Learn More
  • Features
  • AI ToolsNew
  • Resources
  • Solutions
  • Templates
    • Visuals

      • Brochures
      • Greeting Cards
      • Infographic
      • Instagram Posts
      • Invitations
      • Posters
      • See all
    • Diagrams

      • ArchiMate
      • Floor Plan
      • Flowchart
      • Genogram
      • Mind Map
      • UML Class Diagrams
      • See all
    • Charts

      • Bar Charts
      • Candlestick
      • Doughnut Charts
      • Line Charts
      • Pie Charts
      • Radar Charts
      • See all
    • Flipbooks

      • Booklets
      • Business Portfolios
      • Catalogs
      • Lookbooks
      • Prospectuses
      • Personal Portfolios
      • See all
    • Photo Books

      • Baby Photo Bks.
      • Everyday Photo Bks.
      • Family Photo Bks.
      • Pet Photo Bks.
      • Travel Photo Bks.
      • Wedding Photo Bks.
      • See all
    • Animations

      • Explainer Videos
      • Marketing Videos
      • Storytelling Videos
      • See all
    • Office

      • Documents
      • Presentations
      • Spreadsheets
      • Form
  • Pricing
  • Sign up
  • Log in
    • English
    • 简体中文
    • 繁體中文
    • Español
    • Deutsch
    • Polski
    • Português
    • Bahasa Indonesia
    • 日本語
    • 한국인
    • Русский
  • Product
    • Create
      • Diagram Maker

        Make flowchart, software, business diagrams

      • Chart Maker

        Visualize data effortlessly

      • Smart Board

        Ideation and brainstorm with mind maps

      • Form Builder

        Simplify form creation

      • AI Chart

        Transforms your descriptions into beautifully AI-powered designed charts

      • AI SmartBoard

        Instantly create and organize AI-powered generated mind maps with ease

    • Compose
      • Graphic Design

        Professional visual creations

      • Flipbook

        Design online Ebook and slideshow with Fliplify

      • Animation

        Create 2D and 3D animations with AniFuzion.

      • Photobook

        Share memories with our photo books

      • PDF Editor

        Lightweight PDF editor, tools and converters

      • Collage

        Create stunning photo collages to share your story and stand out

      • Document

        Write, format, and collaborate on text documents online.

      • Spreadsheet

        Create, edit, and analyze data in spreadsheets.

      • Presentation

        Build and design slides for impactful presentations.

    • Tools
      • PowerPoint Web Viewer

        Convert PowerPoint to online slideshow viewer

      • AI Image Translator

        AI-powered online tool for translating text in images across any language

      • PDF Editor

        Lightweight PDF editor, tools and converters

      • File Converters

        Convert files with ease

      • Photo Effect Tools

        Enhance images creatively

      • Agilien

        AI-Powered Jira extension to generate initial product backlog.

      • Canvas Tool

        AI-Powered business canvas builder for better strategic analysis.

    • Essential
      • Publishing

        Turn your results into flipbooks, slideshows, or videos, and display them on a virtual bookshelf.

      • AI Tools

        Unlock AI-powered tools that simplify tasks and boost productivity.

  • Features
  • AI ToolsNew
  • Resources
    • Community Creations
      • Book / Slideshow
      • Design / Diagram
    • What's New
    • Learn
    • Blog
    • Knowledge
  • Solutions
    • Education
    • Entertainment
    • Finance
    • Marketing
    • Medical
    • Real Estate
    • Retail
    • Startups
    • Travel
  • Templates
    • Visuals
      • Brochures
      • Greeting Cards
      • Infographic
      • Instagram Posts
      • Invitations
      • Posters
      • See all
    • Diagrams
      • ArchiMate
      • Floor Plan
      • Flowchart
      • Genogram
      • Mind Map
      • UML Class Diagrams
      • See all
    • Charts
      • Bar Charts
      • Candlestick
      • Flowchart
      • Doughnut Charts
      • Line Charts
      • Pie Charts
      • Radar Charts
      • Radar Charts
    • Flipbooks
      • Booklets
      • Business Portfolios
      • Catalogs
      • Lookbooks
      • Prospectuses
      • Personal Portfolios
      • See all
    • Photo Books
      • Baby Photo Bks.
      • Everyday Photo Bks.
      • Family Photo Bks.
      • Pet Photo Bks.
      • Travel Photo Bks.
      • Wedding Photo Bks.
      • See all
    • Collage
      • Mood Boards
      • Comic Strips
      • See all
    • Form
    • Spreadsheets
  • Pricing
    • English
    • 简体中文
    • 繁體中文
    • Español
    • Deutsch
    • Polski
    • Português
    • Bahasa Indonesia
    • 日本語
    • 한국인
    • Русский
  • Sign up
  • Log in
  1. Diagrams
  2. Tutorials
  3. Component Diagram
  • What is a Component Diagram in UML?
  • Component Diagram Notations
    • Component
    • Component Interfaces
    • Component Assemblies
    • Port
  • When to Draw Component Diagram
  • How to Draw Component Diagram?
  • Component Diagram Examples
Component Diagram Tutorial

Component diagrams provide a simplified, high-order view of a large system. Classifying groups of classes into components supports the interchangeability and reuse of code. This diagram documents how these components are composed and how they interact in a system.

Component Diagram Example

What is a Component Diagram in UML?

The main purpose of a component diagram is to show the structural relationships between the components of a system. In UML, Components are made up of software objects that have been classified to serve a similar purpose. Components are considered autonomous, encapsulated units within a system or subsystem that provide one or more interfaces. By classifying a group of classes as a component the entire system becomes more modular as components may be interchanged and reused. Component diagrams document the encapsulation of the component and the means by which the component interacts via interfaces.

Try it!

Finding an online Component Diagram tool? Just click the Draw button below to create your Component Diagram online. Visual Paradigm Online is free* and intuitive. You can also go through this Component Diagram tutorial to learn about Component Diagram before you get started.

Draw Now

Component Diagram Notations

Component

A component is drawn as a rectangle with optional compartments stacked vertically. A component can be represented as just a rectangle with the component's name and the component stereotype text and/or icon. The component stereotype's text is "<<component>>" and the component stereotype icon is a rectangle with two smaller rectangles protruding on its left side.

UML Component Symbol

Component Interfaces

Provide Interface

Provided interfaces define "a set of public attributes and operations that must be provided by the classes that implement a given interface".

Required Interface

Required interfaces define "a set of public attributes and operations that are required by the classes that depend upon a given interface".

Provided and Required Interface

Component Assemblies

Components can be "wired" together using to form subsystems, with the use of a ball-and-socket joint.

Component Diagram ball and socket joint

Port

A port (definition) indicates that the component itself does not provide the required interfaces (e.g., required or provided). Instead, the component delegates the interface(s) to an internal class.

UML Component Diagram Port

When to Draw Component Diagram?

  1. Use component diagrams when you are dividing your system into components and want to show their interrelationships through interfaces.
  2. The breakdown of components into a lower-level structure.

How to Draw a Component Diagram?

  1. Decide on the purpose of the diagram
  2. Add components to the diagram, grouping them within other components if appropriate
  3. Add other elements to the diagram, such as classes, objects and interface
  4. Add the dependencies between the elements of the diagram

You can also:

  1. Draw subsystems for logical categorization of components UML Component Diagram Example: Securities Trading

Component Diagram examples

Order Processing System Component diagram example

One main benefit of Component diagrams if to simplify the high-level view of the system. The Figure below is a much larger view of what is involved in a online store. By using a component diagram we see the system as a group of nearly independent component or subsystems that interact with each other in a specifically defined way.

UML Component Diagram Example: Order Processing System

Each component is responsible for the action for which it is named and interface(s) it provides. As long as those requirements are maintained changes to one component will not percolate to other components.

Ticket Selling System Component Diagram Example

There is a ticket seller component that sequentializes requests from both ticket selling system and clerks. A component that processes credit card charges; and the database containing the ticket information.

UML Component Diagram Example: Ticket Selling System

Component Example - Store Component - nested component structure

To show a nested component structure, you merely draw the component larger than normal and place the inner parts inside the name compartment of the encompassing component. The Figure below show's the Store's component nested structure.

UML Component Diagram Example: Store Component

Component Diagram Example - White-Box View of a Component

In the previous examples, those component diagrams are called black-box views. Ports are shown as squares bordering the component, these indicate how the interfaces of the component are used internally. Objects implementing a required interface are received via a port and objects implementing a provided interface are shared via a port.

In this example, the internal composition of components can also be modeled using component diagrams, this is called a white-box view of the diagram because we can see inside.

UML Component Diagram White Box View
  1. Ports are shown as squares bordering the component, these indicate how the interfaces of the component are used internally.
  2. Objects implementing a required interface are received via a port and objects implementing a provided interface are shared via a port.

Component Diagram Example - Components in Deployment Diagram

Models the physical deployment of software components with UML deployment diagram. In deployment diagram, hardware components (e.g. web server, mail server, application server) are presented as nodes, with the software components that run inside the hardware components presented as artifacts.

UML Components in Deployment Diagram Want to draw a Component Diagram?

You've learned what a Component Diagram is and how to draw a Component Diagram step-by-step. It's time to get your hands dirty by drawing a Component Diagram of your own. Draw UML diagrams free* with Visual Paradigm Online. It's easy-to-use, intuitive.

Draw Now

* The Free edition supports free usage of Visual Paradigm Online for non-commercial use only.

  • ©2025 by Visual Paradigm. All rights reserved.

  • Terms of Service
  • AI Policy
  • Privacy Policy
  • Content Guidelines
  • Security Overview

Từ khóa » Cách Vẽ Uml Component Diagram