August 2018
Beginner
594 pages
22h 33m
English
The ViewModel in the MVVM pattern is similar to the controller and presenter objects that we covered with the MVC and MVP patterns in that they coordinate between the view and the model.
ViewModels provide data to views for display and manipulation, and also contain interaction logic to communicate with views and models. ViewModels must be capable of handling user actions and data input sent from views. It is the ViewModel that contains navigation logic to handle moving to a different view.
Views and ViewModels communicate through multiple methods, such as data binding, commands, method calls, properties, and events.