The Observer pattern, also known as the Publish-Subscriber pattern, is one of the behavioral design patterns that defines a one-to-many relationship between objects. For example, when the state of one object, Subject
, changes, all its dependents, Observers
, are notified and updated automatically by calling their methods.
Mainly, this pattern is used to implement distributed event handling systems. It is also a key part in the Model-View-Controller (MVC) architectural pattern.
from DZone.com Feed https://ift.tt/2qiQhbz
No comments:
Post a Comment