
Design Patterns
Erich Gamma, Richard Helm, Ralph Johnson & John Vlissides
Synopsis
Design Patterns: Elements of Reusable Object-Oriented Software—often called the "Gang of Four" book—catalogues 23 classic design patterns for object-oriented software. Each pattern addresses a recurring design problem and describes a general solution: when to use it, how it works, and the trade-offs involved.
The patterns are grouped into Creational (Singleton, Factory, Builder, etc.), Structural (Adapter, Decorator, Facade, etc.), and Behavioural (Observer, Strategy, Command, etc.). The book emphasises designing to interfaces, favouring composition over inheritance, and naming solutions so teams can communicate design intent clearly.
Why I Recommend It
Even in languages and paradigms that have evolved since 1994, the patterns in this book still underpin how we talk about design. They give a shared vocabulary: "we're using a Strategy here" or "this is essentially an Observer" makes discussions precise. The discipline of identifying recurring problems and named solutions is as valuable as the patterns themselves.
Key takeaways:
- Program to an interface, not an implementation: Reduces coupling and enables flexibility
- Favour object composition over class inheritance: Composition is often easier to change and test
- Patterns capture experience: They document solutions that have worked repeatedly in practice
Practical application: I use it as a reference when reviewing designs or when a codebase has a structural smell that matches a known pattern (or anti-pattern). It's also useful for interviews and mentoring—not to force patterns everywhere, but to recognise when a pattern fits and when it doesn't.
For anyone serious about software design, it's foundational reading.
Favourite Quote
"The best designs use the simplest solutions that work. Design patterns are not a goal; they are a means to an end."
The book itself warns against pattern overload. The goal is clearer, more maintainable code—patterns are tools to get there when the problem warrants them.