When to use

When you need to extend functionality, simplify interfaces, or manage relationships between objects without tight coupling.

Key traits

Common Scenarios

PatternWhen to Use
๐ŸŽ DecoratorAdding responsibilities to objects dynamically without modifying their code
๐Ÿ”Œ AdapterMaking incompatible interfaces work together (legacy integration)
๐Ÿ›๏ธ FacadeProviding a simple interface to a complex subsystem or library
๐Ÿšช ProxyControlling access, lazy loading, or adding cross-cutting concerns
๐ŸŒณ CompositeTreating individual objects and compositions uniformly (tree structures)
๐ŸŒ‰ BridgeSeparating abstraction from implementation to vary them independently
๐Ÿชถ FlyweightSharing common state to efficiently support large numbers of fine-grained objects