What is Observer pattern?

  • A design pattern in which an object, called the composite, is composed of one-to-many other objects, in a tree-like structure, allowing the client to interact with individual objects and compositions of objects uniformly
  • A design pattern in which an object, called the decorator, adds or overrides behavior of an existing object, dynamically
  • A design pattern in which an object, called the proxy, acts as an intermediary between a client and a target object, forwarding requests from the client to the target object and vice versa
  • A design pattern in which an object, called the subject, maintains a list of its dependents and notifies them automatically of any changes to its state
The Observer pattern is a design pattern in which an object, called the subject, maintains a list of its dependents and notifies them automatically of any changes to its state. The Observer pattern is used to implement a publish/subscribe mechanism, allowing the subject to be decoupled from its dependents, and allowing multiple dependents to be notified of changes to the subject's state. The Observer pattern is used to implement event-driven systems.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *