Callback functions are often extended via the use of the Observer pattern. The Observer pattern is often used to implement the Model-View-Controller pattern. Encapsulating these aspects in separate objects lets you vary and reuse them independent When an abstraction has two aspects, one dependent on the other.When a change to one object requires changing others, and you don’t know how many objects need to be changed.In other words, you don’t want these objects tightly coupled. When an object should be able to notify other objects without making assumptions about what the dependent objects are.The Observer pattern is useful in the following situations: For further discussion on our rationale as well as commonly cited differences, see Differentiating Observer and Publish-Subscribe Patterns. The canonical sources we have group these patterns together, and for a number of reasons we agree with this choice. There is a debate over whether or not Observer and Publish-Subscribe are equivalent patterns.