7 PlantUML anti-patterns
This isn’t about how to use PlantUML. It’s about seven ways that “work, but suck” — pulled from real PR reviews and rewrites of my own old diagrams.
1. One diagram, 200 lines
The most common one. A sequence diagram wants to express 12 services and 40+ steps; reviewers can’t follow it.
1 | @startuml |
Slice by business step:
1 | @startuml |
A diagram should have 5–8 steps. 12 max. Past that, split.
2. Unnamed nodes
1 | @startuml |
A / B / C are implicit nodes; rendered as garbled text. At minimum:
1 | @startuml |
actor / participant / database / queue / boundary / control / entity cover the UML participant types; the diagram ends up both readable and UML-correct.
3. Sequence diagrams with no return arrows
Only A -> B: foo, never B --> A:
1 | @startuml |
The whole point of sequence diagrams is the two-way arrows. Without them reviewers can’t tell which way the flow goes.
1 | @startuml |
Even failures get their own arrow:
1 | @startuml |
4. Using sequence for branches
People force if/else into sequence with note blocks:
1 | @startuml |
That’s not what sequence is for. Use activity instead:
1 | @startuml |
Or stay in sequence and use alt:
1 | @startuml |
5. Class diagrams that abuse inheritance
1 | @startuml |
Not every Is-A deserves <|--. Composition, dependency, association are all valid relations:
1 | @startuml |
Default association is dashed; inheritance is the open-triangle arrow — keep them distinct.
6. Theme overload
The worst kind of diagram: someone brought CSS aesthetics into UML. None of it helps comprehension.
1 | @startuml |
Sane version:
1 | @startuml |
Fewer colors = more professionalism.
7. Diagram source detached from rendered artifact
The biggest organization-level anti-pattern: render to PNG, throw away the .puml.
1 | docs/ |
Six months later, a module changes. Nobody updates the diagram. Architecture diagram becomes “an archaeological artifact.”
Correct:
1 | docs/ |
Source and artifact together in git. CI re-renders.
Anti-pattern → refactor table
| Anti-pattern | Impact | Refactor |
|---|---|---|
| 200-line diagram | Impossible to read | Split into 4–5 by step |
| Unnamed nodes | Garbled render | Use participant / actor / database |
| Sequence with no returns | Flow direction unclear | Add response arrows everywhere |
| Sequence for branching | Hard to review | Use activity or alt |
| Inheritance abuse | Distorted design | Use composition / association |
| Theme overload | Diagram looks garish | Default theme or minimal skinparam |
| Source detached from image | Diagram rots | Commit .puml + .svg together |
Review checklist
When reviewing someone else’s PlantUML PR, ask:
- Can this diagram be split into smaller pieces?
- Are all nodes named?
- Does every call in a sequence have a response?
- Is the right diagram type being used (sequence / class / activity / use case)?
- Is the theme minimal?
- Will this stay in sync when the implementation changes?
- Is the source file committed?
- Title: 7 PlantUML anti-patterns
- Author: puml.online
- Created at : 2026-07-29 14:40:00
- Updated at : 2026-08-14 21:34:29
- Link: https://puml.online/blog/plantuml-anti-patterns-en/
- License: This work is licensed under CC BY-NC-SA 4.0.