


This guide provides a mnemonic to help remember key design patterns, categorized into Creational, Structural, and Behavioral patterns. Each pattern is briefly described along with a mnemonic to facilitate recall.
| Category | Pattern | Usage | Mnemonic |
|---|---|---|---|
| Creational | Abstract Factory | Create families of related or dependent objects without specifying their concrete classes | Architect family objects |
| Factory Method | Create objects without specifying the exact class of the object that will be created | Forge objects | |
| Builder | Construct a complex object step by step | Build step by step | |
| Prototype | Create new instances of objects that are identical to existing ones | Painting a clone | |
| Singleton | Ensure a class has only one instance and provide a global point of access to it | Single instance | |
| Structural | Decorator | Add responsibilities to objects dynamically | Dress up |
| Adapter | Convert one interface to another so that it matches what a client expects | Adapt the plug | |
| Facade | Provide a unified interface to a set of interfaces in a subsystem | Front desk | |
| Bridge | Decouple an abstraction from its implementation so that the two can vary independently | Build a bridge | |
| Proxy | Provide a surrogate or placeholder for another object to control access to it | Placeholder proxy | |
| Composite | Compose objects into tree structures to represent part-whole hierarchies | Compose a tree | |
| Flyweight | Minimize memory usage by sharing as much data as possible with other similar objects | Prudent memory | |
| Behavioral | Strategy | Define a family of algorithms, encapsulate each one, and make them interchangeable | Switch strategies |
| Observer | Notify other objects about state changes | Observe and notify | |
| Memento | Capture and restore an object's internal state without violating encapsulation | Memory capsule | |
| Command | Encapsulate a request as an object, allowing for parameterization of clients with queues, requests, and operations | Control commands | |
| Iterator | Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation | Iterate sequentially | |
| Template Method | Define the skeleton of an algorithm in a method, deferring some steps to subclasses | Template for tasks | |
| Visitor | Define a new operation without changing the classes of the elements on which it operates | Visit elements | |
| State | Allow an object to alter its behavior when its internal state changes | State-based behavior | |
| Chain of Responsibility | Pass a request along a chain of handlers, allowing each handler to either handle the request or pass it to the next handler | Send along the chain | |
| Mediator | Define an object that encapsulates how a set of objects interact, promoting loose coupling | Central mediator |