Caveat - I use WPF, not Silverlight.
Using a virtual machine that creates an instance of V (how I do it), the view is independent and can be used independently of the VM (for example, in the designer)
Personally, I turn to MVVMC (models, View, ViewModel, Controller), where I have a control class that creates instances of ViewModels and Views and "attaches them." Then C also processes the receipt of data (and caches it, etc.) and any communication through virtual machines and Vs (for example, if an instance of V is created, routes a command to its virtual machine to perform some action, the VM will probably ask C perform an action on his behalf, C can then raise the corresponding events that other VMs can handle
If (whether you use a controller or not), I need a virtual machine to talk to another virtual machine, it is harder to do if V creates an instance of the virtual machine - because I do not need to expose the virtual machine to V (or, at least make some interface available so that the second VM can talk to 1st).
Maxxx Sep 28 2018-10-12T00: 00Z
source share