31.
http://create.msdn.com
http://silverlight.codeplex.com/
Model-View-ViewModel (MVVM) Explained
WPF Apps With The Model-View-ViewModel Design Pattern - Josh
Smith
http://nrumyantsev.com/
me@nrumyantsev.com
31
Notas del editor
-Does not have a presenter, has a controller-Request first comes to controller, binds the model with the view-Logic is stored in controller
-State and Logic stored in Presenter-Presenter is an abstraction of view, Presenter unaware of view-View is aware of Presenter, however isolated from Model
-State and Logic stored in Presenter-Presenter is an abstraction of view, Presenter unaware of view-View is aware of Presenter, however isolated from Model-Uses WPF and Silverlight bindings-A very loose coupling between view and viewmodel, very easy to write unit tests-Growing in popularity (several toolkits MVVM Light, Prism, Caliburn)-Used internally at Microsoft during Expression Blend creation
-CanExecute determines if the command can be invoked on the current command target-Execute determines the command action to be performed-CanExecuteChanged event is raised when the command manager detects a change in the command source
-Uses the System.Windows.Interactivity namespace
-Avoid having to write separate class for commands, and implementing Icommand-lamba expression as an action
-allows you to send messages between view models-possible to open up filtered channels (to target types/interfaces)
-the sender sends a string message with a parameter of type NotificationMessageAction<string>-the callback parameter is a string
-The recipient registers to receive a message of type NotificationMessageAction-The Notification property of the NotificationMessageAction type contains the string message-The recipient executes the sender’s callback with a string parameter
-CheckBeginInvokeOnUI excepts Action parameter-Also contains UIThreadDispatrcher property in case you need to do other work on the UI thread.