Unified Modeling Language (UML)

Reference: UML Diagrams

Free tools for creating UML diagrams:

Tool Typical use
Excalidraw Informal sketches / whiteboarding
Draw.io General UML and other diagrams
Lucidchart General UML and other diagrams
Mermaid Text-based diagrams in Markdown
DB Diagram Database schemas / ER diagrams only

Background

Prior to UML...

Now, with UML...

What is UML?

Not a programming language

Hooray standards!

Do We Really Need to Know All This?

Per IBM: An introduction to the Unified Modeling Language:

The most useful, standard UML diagrams are: use-case diagram, class diagram, sequence diagram, statechart diagram, activity diagram, component diagram, and deployment diagram.

Different domains use some more than others.

When to Use UML

Diagram Types

Use Case Diagram

Description

Key components

Class Diagram

Description

Multiplicity Option Cardinality
0..0 0 Collection must be empty
0..1 No instances or one instance
1..1 1 Exactly one instance
0..* * Zero or more instances
1..* At least one instance
5..5 5 Exactly 5 instances
m..n At least m but no more than n instances

Concrete and abstract entities:

Key components

For dog walking service, how would we show…

Sequence Diagram

Description

What has to happen before another thing happens? Who is involved?

Key components

State Diagram

Description

Shows states of a system and how it transitions between them.

Key components

Planning a user registration and login workflow:

Each page can be modeled as a state, shown here by a set of four variables:

Variable Description
uname The username of the user
pwd The password of the user
verified Whether the user has verified their email
token The authentication token (a hidden field used for authentication)

Transitions show how users get from one page to another.

Activity Diagram

Description

Key components

Hybrids

Swimlane Diagram

Custom

It’s useful to have a baseline knowledge of UML if you work with software at all. Even rough sketches can save valuable communication time.

Mix and match to suit your needs.