Library Discover Ideas My library Paths Compare Shelves Collections Method
Design PatternsErich GammaCover of Design Patterns by Erich Gamma
3 min read

Technology & AI

Design Patterns

Erich Gamma

The 1994 catalogue by Gamma, Helm, Johnson and Vlissides that gave object-oriented design a shared vocabulary — twenty-three recurring solutions to recurring problems, each named, described and illustrated.

First published
1994
Publisher
Addison-Wesley
Pages
395
Level
Deep
ISBN-13
9780133052664
softwarearchitectureclassic

Record checked against

Catalogue note

Reads as
TechnicalAssumes and builds craft knowledge.
Level
Advanced / AdvancedAssumes you have read around the subject already.
Approach
Applied
Written for
Engineers, Specialists and serious readers
Your shelf

Saved in this browser only — no account, nothing sent anywhere. My library

Read this if

  • You build software and want the ideas under the tools.
  • You work in this area and want depth rather than an overview.
  • You have read around this already and want a book that assumes it.
01

What a pattern is

Their definition, borrowed from the architect Christopher Alexander: a pattern describes a problem that occurs repeatedly, and the core of a solution to it, in a way that the solution can be reused without ever doing it the same way twice.

The emphasis on recurrence is what distinguishes a pattern from a technique. They are documenting solutions that experienced designers had converged on independently, not inventing new ones.

They did not invent these. They noticed experienced designers had independently converged on the same answers.

Devmark’s reading — not a quotation from the book
02

The vocabulary contribution

The book's largest and least disputed effect was linguistic. Before it, one programmer describing a design to another had to explain the whole structure; afterwards, naming the pattern conveyed it.

Observer, Factory, Strategy, Decorator, Adapter and Singleton are now common speech in software teams, and most people using them have never opened the book.

03

The three categories

Creational patterns concern how objects are made — Factory Method, Abstract Factory, Builder, Prototype, Singleton. Structural patterns concern how objects are composed — Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy.

Behavioural patterns concern how objects communicate and distribute responsibility — Observer, Strategy, Command, Template Method, State, Chain of Responsibility, and others. The grouping is useful for browsing rather than analytically deep.

04

The principles underneath

Two maxims recur throughout and are more valuable than any individual pattern. Programme to an interface, not an implementation. Favour object composition over class inheritance.

The second is the book's most consequential argument and was counter-cultural at the time, when deep inheritance hierarchies were considered the point of object orientation. The intervening decades have substantially vindicated it.

05

Where the patterns are language artefacts

A criticism that has grown stronger with time: several patterns exist to work around limitations of the languages the authors used.

Strategy, Command and Template Method are largely unnecessary in a language with first-class functions; Iterator is built into most modern languages; Singleton is now widely considered an anti-pattern. Peter Norvig's observation that many patterns are invisible or trivial in more expressive languages is the standard form of this critique.

Several patterns are workarounds for missing language features. In a language with first-class functions they vanish.

Devmark’s reading — not a quotation from the book
06

The over-application problem

The book's most damaging legacy was not its content but its adoption. A generation of developers applied patterns as a demonstration of competence rather than in response to a problem.

The authors warn against this explicitly — patterns are solutions to problems you actually have — and the warning was widely ignored, producing codebases with elaborate indirection serving no purpose.

07

How it reads

Poorly, by modern standards. The examples are C++ and Smalltalk, the diagrams use a pre-UML notation, and the structure is a reference catalogue rather than a narrative.

Nobody reads it straight through successfully. Its intended use is consultation when you have a specific structural problem, and even then most readers now get the content from secondary sources.

08

What has genuinely survived

The vocabulary, completely. The composition-over-inheritance principle, strongly. Several individual patterns — Observer, Adapter, Facade, Decorator, Strategy — remain useful descriptions regardless of how they are implemented.

What has not survived is the implied claim that this is the right level of abstraction for thinking about design, and the assumption that object-oriented decomposition is the default.

09

Its historical position

It is among the most influential software books ever published, and its influence is now largely indirect: the ideas are embedded in frameworks, languages and standard practice rather than being consciously applied.

That is arguably the best outcome a book of this kind can have — the contents became infrastructure.

10

What to take from it

The two principles are worth more than the catalogue: programme to interfaces, and prefer composition to inheritance. Both remain correct and both are still routinely violated.

And the discipline the book states and its readers ignored — a pattern is an answer to a problem you have, and applying one without the problem adds cost with no benefit.

—

What to take away

  1. 01The contribution was vocabularyNaming the structure let one programmer convey a design to another in a phrase instead of a diagram.
  2. 02Prefer composition to inheritanceCounter-cultural in 1994, substantially vindicated since, and still routinely violated.
  3. 03Some patterns are missing language featuresStrategy, Command and Template Method largely disappear in a language with first-class functions.
  4. 04Applying a pattern without the problem costsThe authors warned about this explicitly and a generation of developers ignored it.
  5. 05The ideas became infrastructureThey now live in frameworks and languages rather than being consciously applied, which is the best outcome available.

Reading journey

A route through this idea

This book is not on a curated path, so the route below is derived from the catalogue: what comes before it, what goes further, and what approaches the same ground differently.

  1. Start hereThe Mythical Man-MonthComputing, and it assumes less before you start.
  2. You are hereDesign Patterns
  3. A different angleRefactoringAlso about Computing, but it reads as reference where that one is technical.
  4. Somewhere else entirelyAn Elegant PuzzleManagement and Computing travel together in this library, and this comes at it from the other side.

Nearby on the shelves

Related reading

If you liked this

Where to go next

Each suggestion is scored from what the catalogue already records about both books — shared ideas, level, reading mode and tone. The reason you see is generated from the same figures that ranked it.

↑↓ to move↵ to openesc to close