Reputation: 8305
The power point of this session( http://channel9.msdn.com/Events/MIX/MIX10/EX14 ) shows a diagram like this:
It looks kind of odd. when do the model and the view communicate with each other directly?
PS: I did not watch the whole session, I only read the ppt, so please bear with me if he explained it in the video.
Upvotes: 1
Views: 333
Reputation: 6662
In certain cases, the Model objects implement INotifyPropertyChanged. For instance, EF entities do, or in WCF, the proxy generated on the client also automatically implement INPC. In other cases, if you create the data objects yourself, it might also make sense to have them implement INPC.
This is useful if you want to avoid having to replicate every property of every data object, and make them observable. In this purpose, MVVM Light V4 now has the ObservableObject class which is a lightweight implementation of INPC. ViewModelBase is inheriting ObservableObject and adds a few more features that are specific to ViewModels.
Note that of course your mileage may vary (YMMV) and in some cases it does not make sense to have the data objects implement INPC. As usual, be pragmatic and evaluate every situation. However in cases where the data object does implement INPC, you can then data bind directly to the data object's property, which is what this arrow means.
Cheers, Laurent
Upvotes: 7