UML guide
The subset worth knowing, and why relationship notation is not decorative.
UML is large and mostly unused. Two diagram types carry nearly all the practical value: class diagrams and sequence diagrams.
Class diagrams
Three sections — name, attributes, methods — and visibility markers: plus for public, minus for private, hash for protected.
The notation means something
| Relationship | Marker | Means |
|---|---|---|
| Inheritance | Hollow triangle | Is a kind of |
| Aggregation | Hollow diamond | Has, but parts survive independently |
| Composition | Filled diamond | Has, and parts die with the whole |
| Dependency | Dashed, open arrow | Uses, without owning |
Aggregation and composition differ only by whether the diamond is filled, and they say opposite things about lifetime. Getting it wrong makes the diagram assert something you did not mean.
Sequence diagrams
Time runs down, participants run across. The order of messages is the design — which is why DiagramDock reorders them by index rather than letting you drag them into a time order that never happens.