puremvc
|
|
« Reply #1 on: May 02, 2009, 06:10:48 » |
|
Three things that are wrong:
1) Command not Controller. Their is just one Controller and it executes Commands mapped to Notifications.
2) The Command retrieves the Proxy and gives it the data. The Proxy 'has no ears'; it cannot receive Notifications. If it could, it would be too tempting to have it listen for notes defined elsewhere in the app, making it less reusable. (Always assume you'll reuse your model tier classes in another app).
3) By using sendNotification, you've already used the Facade. sendNotification is a convenience method that uses the local reference to the Facade that every Command, Mediator or Proxy already has.
-=Cliff>
|