Observer pattern allows one object (the observer) to watch another (the subject)
The subject object notify the observer object if the subject’s state changes (Conceptually, the Observer pattern in something like a trigger in a database, which runs a stored procedure when a table row is modified
The main advantage of this pattern is that it decouples the observer from the subject
The subject doesn’t need to know anything special about its observers. Instead, the subject simply allows observers to subscribe.
First, they provide you with a way to solve issues related to software development using a proven solution. The solution facilitates the development of highly cohesive modules with minimal coupling
Second, design patterns make communication between designers more efficient. Software professionals can immediately picture the high-level design in their heads when they refer the name of the pattern used to solve a particular issue when discussing system design.