Leveraging Behavioral Design Patterns

Behavioral design patterns help to organize communication between objects. This includes the ability to extend functionality without modifying these existing classes. By implementing the behavioral design patterns covered in this chapter and how they’re used in the JavaScript ecosystem, we’ll learn to build JavaScript applications that can be extended without touching existing functionality.

We’ll cover the following topics in this chapter:

  • An understanding of the behavioral design pattern classification
  • An implementation of the observer pattern and how the common Web EventTarget API exposes it
  • Implementations of the state and strategy pattern, both with a class-based approach and a function-based approach ...

Get JavaScript Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.