Observer design pattern Edit
Observer is a software design pattern and is one of the most commonly used design patterns. In Observer design pattern there is an object named Subject which maintain a list of its dependents called Observers and it notifies the observers usually by calling one of their methods when the state changes.