A shared vocabulary for object-oriented design
The 1994 book Design Patterns by Gamma, Helm, Johnson and Vlissides — the Gang of Four — catalogued 23 reusable solutions to recurring design problems. This reference lists all 23, grouped by purpose, with each pattern’s intent and a concrete use case so you can recognise where one fits. Search by keyword or filter by group.
How it works
The patterns split into three families by what they manage:
Creational (5) → how objects are created
Abstract Factory, Builder, Factory Method, Prototype, Singleton
Structural (7) → how objects are composed
Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
Behavioural (11) → how objects communicate and share responsibility
Chain of Responsibility, Command, Interpreter, Iterator, Mediator,
Memento, Observer, State, Strategy, Template Method, Visitor
Each pattern names a problem and a tested solution, so “use an Adapter here” or “this needs an Observer” conveys a whole design in two words. The value is the shared vocabulary as much as the code structure.
Tips and notes
- Reach for a pattern when it genuinely simplifies a design — over-applying them adds indirection without benefit.
- Several patterns are now language features: iteration, events and first-class functions can replace Iterator, Observer and Strategy boilerplate.
- Decorator, Proxy and Adapter look similar but differ in intent: Decorator adds behaviour, Proxy controls access, and Adapter changes an interface.
- Favour composition (Strategy, Decorator) over deep inheritance hierarchies.