Skip to content

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.

An ecommerce model. OrderLine exists so that price is captured at the time of sale rather than read from Product later.
An ecommerce model. OrderLine exists so that price is captured at the time of sale rather than read from Product later.Open this template

The notation means something

RelationshipMarkerMeans
InheritanceHollow triangleIs a kind of
AggregationHollow diamondHas, but parts survive independently
CompositionFilled diamondHas, and parts die with the whole
DependencyDashed, open arrowUses, 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.

Templates