This chapter covers the Observer pattern.
GoF Definition
It defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Concept
In this pattern, there are two types of objects. One is an observer and the other is the subject. What is an observer? In simple words, it is an object that needs to be informed when interesting stuff happens in another object. The object about whom an observer is interested is called the subject.
Normally many observers ...