Summary
We began the chapter with the MVC pattern. We explored the Model, the View, and how the Controller interacts with them. We also illustrated the concepts with a real-life example of the drafting of a contract for the exchange of services among households. The UI of the drafting and confirmation screens was used in the example, with the Controller driving the navigation and submitting the draft contract.
Then, we bought in the MVP pattern by evolving from MVC. The Presenter was introduced to replace the Controller, and callback functions from the Model were added to the pattern to further isolate the View and the Model. Then, we came back to the same real-life example, and the original code base of MVC was modified to become MVP.
Afterward, we introduced the MVVM pattern by evolving from MVP. The View Model was added as an intermediary between the View and the Model. Data binding was supported to automatically synchronize data between the View and the View Model. We reused...