As I explained in my last post on MVVM in WinJS, the goal of the MVVM pattern (as well as the Presentation Model pattern) is to create a separation of concerns between the model and the view. This eliminates the need for the model to have knowledge of the view, and leverages data binding techniques to make sure the state of the model is always accurately represented by the view.
The next step in implementing the MVVM pattern is Observable Collections. Just as important as having individual items being Observable by the View for changes are collections that will notify the View when items are added or deleted. Fortunately, Microsoft has made this extremely simple with the WinJS.Binding.List.
↧