What is Observer Design Pattern ?
Intent
- Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. [GoF, p293]
- Encapsulate the core (or common or engine) components in a Subject abstraction, and the variable (or optional or user interface) components in an Observer hierarchy.
- The “View” part of Model-View-Controller
Problem
A large monolithic design does not scale well as new graphing or monitoring requirements are levied.
Why to read, you can just watch the below videos to understand Decorator Design pattern and its implementations and share your comments ?
