What is a GoF Design Pattern?
GoF design patterns, told as a story about a publishing house's formula book — proven solutions collected for each commonly repeated writing problem.
Every writer reinvents how to plant a plot twist, from scratch.Even though many books have already solved this same problem.
A suggestion that everyone write their own way ends up making every book's structure different.Reinventing the method every time means writing with one never proven.
GoF design patterns are a formula book of proven solutions for repeated problems.Four authors (the Gang of Four) organized the patterns into 23 formulas.
The formulas split into three families.Memorizing formulas alone doesn't make a good book.
Choosing which formula to use is still the writer's own judgment.Patterns are tools in hand — when to use them is still up to the writer.
GoF design patterns = a book of 23 proven formulas, one for each commonly repeated problem.
GoF (Gang of Four) refers to the four authors who catalogued these patterns, split into 23 patterns across three categories: creational (how objects get made), structural (how classes and objects are composed), and behavioral (how objects share work and communicate). Each pattern is a named, reusable solution to a specific design problem — what matters more than memorizing the patterns themselves is judging which one fits a given situation.
When grown-ups say it
- Gang of Four
- The four authors who first compiled the formula book. Catalogued the 23 patterns.
- Creational Patterns
- Formulas for bringing a character to life. Includes singleton, factory method, and more.
- Structural Patterns
- Formulas for weaving chapters together. Includes adapter, decorator, and more.
- Behavioral Patterns
- Formulas for how an event ripples outward. Includes observer, strategy, and more.
- Software Architecture
- The structural blueprint for the whole book. A much larger unit than a design pattern.
- Reengineering (3R)
- Tracing a lost original backward to rebuild it. These formulas can be applied while rewriting. → tracing back a lost original to rebuild it
- Refactoring
- Keeping the plot but polishing the sentence structure. A pattern can be the destination refactoring moves toward.
- UML Diagrams
- The design map drawn before writing. Also used to draw a pattern out visually. → the design map drawn before writing