Unified Modeling Language (UML)

Home

Table of Contents

UML

Class diagram

Figure 1 shows an example of a class diagram.

  • Person is a (extension of) Mammal,
  • Person has a public attribute: name,
  • Person implements the Flippable interface,
  • Person has a BackPack,
  • the eatMyApple method is private,
  • and the doBackFlip method is public.

Note the different type of arrows connecting the nodes.

uml-class-diagram-example.png

Figure 1: Example of a UML class diagram generated with yEd.

example-class-diagram.png

Figure 2: Example of a UML class diagram generated with PlantUML.

yEd

  • Graphs are saved as graphml files (an XML format), but you can also export them as PNG or SVG.
  • ctrl f to search a graph, you can also dock the search window. Then use the Nodes tab to select based on label text (or however else you want to search it).
  • Alt + Shift + g to use an organic layout of the graph.
  • Alt + Shift + h to use the heirarchical layout of the graph.
  • In the property of a UML node there are textboxes that allow you to enter methods and attributes

Examples

Database schema

uml-database-schema-example.png

Figure 3: Example of a visualisation of a database schema generated with yEd.

PlantUML

See my PlantUML Gallery

  • There is a spacemacs layer for PlantUML.
  • The file extension is .puml.
  • To generate an SVG (PNG is the default) use the following command: java -jar <path/to/plantuml.jar> --svg <my/diagram.puml>
@startuml
  zeroOrOne |o--|| exactlyOne
  exactlyOne ||--o{ zeroOrMany
  zeroOrMany }o--|{ oneOrMany
  oneOrMany }|--o| zeroOrOne
@enduml

Author: Alexander E. Zarebski

Created: 2026-07-16 Thu 10:48

Validate