The Chronicle 4 min read
Design Patterns

Design Patterns Cheat Sheet: All 23 GoF Patterns, One Page

Every Gang of Four pattern with a one-line intent, a real-world example, and a link to the full note

L
LLDCanvas Team·Engineering
August 11, 2026
4 min read 59 views 0 likes
Jump to section

This is a scannable, one-page reference to all 23 Gang of Four design patterns - what each one does, a one-line real-world example, and a link to the full revision note where one exists. Use it the night before an interview to jog your memory, not as your first introduction to any pattern - if a name here is unfamiliar, read the complete Design Patterns guide first.

01Creational Patterns

Concerned with how objects get created, so the rest of the system doesn't depend on concrete classes.

PatternIntentExampleFull Note
SingletonExactly one instance, one global access pointA database connection poolRead note
Factory MethodLet subclasses decide which concrete class to instantiateA VehicleFactory that returns Car, Bike, or TruckRead note
Abstract FactoryProduce families of related objects without specifying concrete classesA UI toolkit that creates matching buttons and checkboxes per themeRead note
BuilderConstruct a complex object step by stepAssembling an HTTP request with many optional headersRead note
PrototypeCreate new objects by copying an existing instanceCloning a pre-configured game character templateRead note

02Structural Patterns

Concerned with how classes and objects are composed into larger structures.

PatternIntentExampleFull Note
AdapterConvert one interface into another that a client expectsWrapping a legacy payment API to match a new interfaceRead note
BridgeDecouple an abstraction from its implementation so both can vary independentlyA RemoteControl abstraction that works with any Device implementationRead note
CompositeTreat individual objects and compositions of objects uniformlyA file system of files and folders, both traversable the same wayRead note
DecoratorAttach new behavior to an object at runtime without subclassingAdding scroll bars or borders to a UI component dynamicallyRead note
FacadeOffer a simplified interface over a complex subsystemA single checkout() call that hides inventory, payment, and shipping callsRead note
FlyweightShare common state across many objects to save memoryReusing glyph objects across millions of characters in a text editorNot yet published
ProxyProvide a stand-in that controls access to another objectA lazy-loading image placeholder that fetches the real image on demandRead note

03Behavioral Patterns

Concerned with how objects communicate and distribute responsibility.

PatternIntentExampleFull Note
ObserverNotify all dependents automatically when one object's state changesEvent listeners in a pub/sub systemRead note
StrategyMake an algorithm swappable at runtime behind a common interfaceChoosing a pricing strategy by day, weekend, or holiday rateRead note
CommandEncapsulate a request, and its undo logic, as a standalone objectUndo/redo stacks in a text editorRead note
StateLet an object change its behavior when its internal state changesA vending machine's Idle / HasMoney / Dispense statesRead note
Chain of ResponsibilityPass a request along a chain of handlers until one handles itHTTP middleware and authentication pipelinesRead note
Template MethodDefine an algorithm's skeleton, let subclasses override individual stepsA DataParser base class with format-specific parse() overridesRead note
IteratorAccess elements of a collection sequentially without exposing its structureEvery for-each loop in every languageRead note
MediatorCentralize complex communication between objects into one mediatorAn air-traffic-control style coordinator between planesNot yet published
MementoCapture and externalize an object's state so it can be restored laterUndo history and save/restore snapshotsRead note
VisitorAdd new operations to a group of related classes without modifying themA tax-calculation visitor applied across different Product subclassesNot yet published
InterpreterDefine a grammar representation and an interpreter to evaluate itSimple rule engines and expression parsersNot yet published

04Which Ones Actually Matter for Interviews

You will not be asked to recite all 23. In practice, Singleton, Factory Method, Builder, Decorator, Facade, Observer, Strategy, Command, and State cover the overwhelming majority of LLD interview problems - see the full breakdown in the Design Patterns guide for why those nine dominate, and practice them directly on real problems like Parking Lot, Vending Machine, and Elevator System.

Frequently Asked Questions

AThe Gang of Four book defines 23 patterns across three categories: Creational, Structural, and Behavioral.

L

LLDCanvas Team

Engineering at LLDCanvas

Ready to practice?

Turn reading into results

110+ LLD interview questions, a live canvas, and timed Interview Mode.

Reader’s Notes (0)

Sign in to join the discussion

Sign in

Loading notes…