JavaScript: Design Patterns

Design patterns tends to be:

  • DRY (Don’t repeat yourself)
  • Modular
  • Reusable
  • Easier to maintain
  • Easier to discuss with peers at a high level (vs diving into implementation details)

Traits of anti-design patterns:

  • Namespace pollution — unexpected behavior from interactions from different clients
  • Increased code complexity
  • Code being difficult to understand and update
  • Difficulty with testing and debugging code