Intent
Define a dependency between objects so that when one object changes state
then all its dependents are notified.
Applicability
- When a change ton one object requires changing others
- Decouple notifier from other objects
Structure
[to do: diagram with Subject and Observer]
Consequences
- abstract coupling of subject and observer
- object is responsible only for its own state (foster reusability)
- unexpected updates, update overhead
Implementation
- push/pull model for notifications
- change interests
- registering operation to be called
- can result in cycles that have to be manually broken
Uses in JHotDraw