🛠 Tips for Identifying and Applying Design Patterns in Projects - linhvuquach/design-patterns-practical GitHub Wiki

✅ Recognize Situations for Patterns

Problem Common Pattern
Object creation logic scattered Factory
Need to switch between algorithms Strategy
Need to delay heavy object loading Proxy
Support for undo/redo Command
Notify parts of system on event Observer
Complex object construction Builder

🔍 Pattern Triggers

  • “I need to add new behavior without changing existing code” → Strategy, Decorator
  • “This class is doing too much” → Use patterns to decompose responsibility.
  • “Users should be able to extend this feature” → Apply Template Method, Observer, or Plugin using Command.