The Observer pattern is a behavioral design pattern that defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
In a simple words, it is like a publisher and subscriber pattern. When publisher publishes something, all it’s subscriber gets notified.
One Example could be, when we subscribe someone’s mailing list we get notified whenever the publisher publishes something.
[Read More]