This section collects GoF patterns with practical examples and guidance. Use it to pick a suitable pattern, not to force one. **Object creation i
Design Patterns Overview
This section collects GoF patterns with practical examples and guidance. Use it to pick a suitable pattern, not to force one.
Quick decision guide
- Object creation is complex → look at Creational patterns.
- You need to compose behavior → look at Structural patterns.
- You want flexible interactions → look at Behavioral patterns.
Common comparisons (quick picks)
- Strategy vs State: Strategy is chosen by the client; State changes from within the object.
- Adapter vs Facade: Adapter changes an interface; Facade simplifies a subsystem.
- Decorator vs Proxy: Decorator adds behavior; Proxy controls access.
Pattern map (by intent)
Next steps
- Start with the closest intent.
- Check “Related patterns” for alternatives.
- If two patterns fit, pick the simpler one.