Chapter 26
- The observer pattern maintains a list of objects that are interested in the state of a target object and notifies the former when the latter changes.
- While the MVC pattern may implement the same function logic of updating views when the model changes, the observer pattern is more effective at maintaining and managing the list of subscribers for a given publisher, making it easy to, for example, add or remove subscribers.
- We implement data formatters that display an object in different ways. Here, we have multiple subscribing formatters that are interested in a publishing default formatter. When the default formatter is updated, the subscribers are notified and proceed with their respective logic.