Understanding the MVVM pattern
At its core, MVVM is a presentation pattern designed to control the separation between user interfaces and the rest of the application. The key elements of the MVVM pattern are as follows:
- Models: Models represent the business entities of an application. When responses come back from an API, they are typically deserialized to models.
- Views: Views represent the actual pages or screens of an application, along with all of the elements that make them up, including custom controls. Views are very platform-specific and depend heavily on platform APIs to render the application's user interface (UI).
- ViewModels: ViewModels control and manipulate the Views by serving as their data context. ViewModels are made up of a series of properties represented by models. These properties are part of what is bound to the Views to provide the data that is displayed to users, or to collect the data that is entered or selected by users. In addition to model-backed properties...