May 2022
Intermediate to advanced
678 pages
11h 48m
English
This chapter covers the Observer pattern.
It defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
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 ...