Observer Design Pattern
- The Observer :
Is a software design pattern in which an object, called the Subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes by calling one of their methods.
The observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Another name of Observer is listener.
Figure : Diagramme UML du Observer pattern.
Example code source : https://github.com/MarquiseG/TheObserverPattern
Add a comment