Design Patterns
Current web edition: designpatterns.saturngod.net
Scope
The current online book contains chapters covering UML introduction, use-case diagrams, sequence diagrams, class diagrams, design-pattern foundations, and sixteen named patterns:
- Facade
- Command
- Strategy
- Template Method
- Observer
- State
- Composite
- Iterator
- Chain of Responsibility
- Adapter
- Proxy
- Factory
- Builder
- Singleton
- Decorator
- Visitor
Pattern decisions
- Facade: offer a simpler stable entry point to a complex subsystem. Risk: a god facade that accumulates unrelated responsibility.
- Command: represent an action as an object. Enables queues, logging, history, undo/redo, and replay. Risk: class/indirection explosion.
- Strategy: exchange algorithms behind one contract. Useful when selection varies at runtime. Risk: abstraction before genuine variation.
- Template Method: fix an algorithm skeleton while subclasses customize steps. Risk: rigid inheritance coupling; composition may be clearer.
- Observer: notify dependents when state/events change. Useful for UI/events. Risk: hidden flow, ordering problems, leaks, and cascading updates.
Selection rule
Name the changing pressure first. Apply a pattern only when its structure makes that change safer or more explicit. Patterns are shared language, not a quality score.
Full working synthesis: Design Patterns Selection Guide.
Online-edition processing record
- Indexed from the official site on 2026-08-12.
- Table of contents: cover, preface, 5 UML/pattern-foundation chapters, 16 pattern chapters, references.
- The online edition and its search corpus were checked in addition to the previously processed PDF.