Observer – defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Subjects, or as we also know them, Observables, updates Observers using common interface. Subjects are loosely coupled in that that Observales knows nothing about them, other than they implement the Observer interface.
- Strive for loosely coupled designs between objects that interacts.
Latest Source Code: