What are the Pros and Cons of an Observer Design Pattern

PROS:                                                 Loose coupling between Subject and Observer: The subject knows only a list of observers, that implementthe Observer interface, it does no know the concrete implementation of the Observer. Broadcast communication: An eventnotification is broadcast to observers irrespective of the number of Observers CONS:                                                If not used carefullythe observer pattern can add unnecessary complexity. The order of Observer notifications … Read more

Can you List some Java Interfaces that use the Observer Design Pattern

The Java Message Service (JMS) models the observer pattern, with its guaranteed delivery, non-local distribution, and persistence, to name a few of its benefits. The JMS publish-subscribe messaging model allows any number of subscribers to listen to topics of interest. When a message for the published topic is produced, all the associated subscribers are notified. … Read more

What is an Observer Design Pattern

The Observer pattern is a behavioral design pattern that  allows an object (an Observer) to watch another object (a Subject). The subject and observer to have a publish/subscribe relationship. Observers can register to receive events from the Subject. Some of the practical uses of observer pattern are: When a change to one object requires changing … Read more