Mediator Vs Observer Object-Oriented Design Patterns
问题 I have been reading the Gang Of Four , in order to solve some of my problems and came across the Mediator pattern. I had earlier used Observer in my projects for making some GUI application. I am a bit confused as I do not find great difference between the two. I browsed to find the difference but could not find any apt answer for my query. Could some one help me to differentiate between the two with some good example which clearly demarcates the two? 回答1: The Observer pattern: Defines a one