Skip to content

Basic UML

Vanskarner edited this page Jul 29, 2023 · 3 revisions

If you are already familiar with the UML and the class, package, and component diagrams, you can skip to the following topics. Here we will see the UML 2.5 standard represented by the PlantUML tool.

Class Diagram

It is a visual representation that shows the classes of a system and the relationships between them.

Basic Class Diagram Representation

Relations

  1. Association: It represents a semantic relationship that can occur between objects of specific classes, and is represented by lines connecting the classes involved. Each end can have the type of object that is expected at the end of the relationship, can have multiplicity indicating how many objects can participate in the relationship, and can also be unidirectional or bidirectional.

Association Representation

  1. Dependency: Indicates that a class (called client) uses the services or depends on the elements of another class (called provider) in some respect. This implies that any changes made to the provider may affect the client.

Dependency Representation

  1. Generalization: Describes the hierarchy between classes or types of objects, represented by a solid line and a hollow triangle. This relationship allows the inheritance of characteristics and behaviors.

Generalization Representation

  1. Realization: It represents the implementation of an interface by a class, and is similar to inheritance, but refers to the implementation of interfaces instead of the class hierarchy. This relationship allows code reuse and the clear definition of contracts in software design.

Realization Representation

Package Diagram

A graphical representation of how a software system is organized. This type of diagram uses packages to group related elements, which helps to understand the structure of the system and how they relate to each other.

The following diagram shows the same relationship seen in a different way:

Basic Package Diagram Representation

Component Diagram

It represents the structure and relationships between the components of a software system, showing how they are connected through interfaces and connectors. Its purpose is to visualize the system architecture, relationships and communications between components at different stages of the software system life cycle.

Representation Simple Dependency Relationship
BasicRepresentation GeneralDependencies

The following diagram shows the same as the diagram called "Simple Dependency Relationship", but showing interfaces:

Component dependencies showing interfaces

Clone this wiki locally