puremvc
|
|
« Reply #1 on: February 15, 2009, 08:46:42 » |
|
Mediators also listen for notifications. For instance, an update notification from a proxy might cause several mediators to be notified so that they can in turn update their view components accordingly.
Aside from coordinating complex activities like startup, commands are also used to update the model in response to interaction at the view. For instance, a menu item or a keystroke or a button press might all lead to the same action of requesting that a proxy fetch its data. By having the mediators for the menu, the component with the button and the stage (keystroke) all send events that lead to the same notification being sent, then the command that responds to that notification is the only place that the proxy fetch invocation needs to happen.
-=Cliff>
|