<<< Memento Implementation | Index | Observer Structure >>> |
Problem to solve:
Consider an object with state, referred to as a subject.
There may be a number of objects in the system who depend on the subject's state.
Therefore, dependent objects would benefit from becoming observers of the subject's state.
Solution:
Let Observers register with the Subject.
When Subject undergoes its state change, all Observers are notified.
The Observer pattern realizes a framework known as Publish/Subscribe, or Event Listener.
<<< Memento Implementation | Index | Observer Structure >>> |