#Why is the observer pattern associated with MVC? Can't seem to find where it fits.

4 messages · Page 1 of 1 (latest)

lost sage
#

Developing a MVC application for school, can't seem to understand why my professor is asking us to implement observer pattern when it seems like something like a mediator would be better for the job. Looking for help to understand why the observer pattern would be recommended?

sterile anvilBOT
#

Hey, @lost sage!
Please remember to /close this post once your question has been answered!

sweet flume
#

The view(s) act(s) as observer(s) to the model. When the model changes, the views are notified and make the appropriate changes if any. Using a mediator would mean the mediator would need to know about all views that exist