← All concepts
TechnologyDevelopment
UML diagrams
The UML diagram families and when to use each — structure vs behaviour.
UML (Unified Modeling Language) is a standard notation for modelling software. Its diagrams split into structural (what the system *is*) and behavioural (what it *does*).
Structural diagrams
| Diagram | Shows |
|---|---|
| Class | Classes, their attributes, methods, and relationships |
| Object | Specific instances at one moment in time |
| Component | How code is packaged into components |
| Deployment | Hardware nodes and what runs on them |
Behavioural diagrams
| Diagram | Shows |
|---|---|
| Use case | Actors and the goals they pursue |
| Sequence | Messages exchanged between objects over time |
| Activity | A workflow or flowchart of steps |
| State machine | An object's states and the transitions between them |
Reading a class box
+-------------------+ | Account | <- name +-------------------+ | - balance: int | <- attributes +-------------------+ | + deposit(n) | <- operations | + withdraw(n) | +-------------------+
Tip:Visibility markers:
+ public, - private, # protected.Related:Software development process
