A real-life example of MVC
We are going to apply MVC in building a frontend application for households to draft a contract for the exchange of service (the “contract”) with their neighbors. We will use Android Studio and the Android Software Development Kit (SDK).
The draft contract should contain basic information, such as each household’s name and the services to be exchanged. The household uses a mobile application to create a draft contract record. The application as the View has only two screens, as shown here:
Figure 5.2 – Sample mobile application for drafting a contract
The first screen allows the household to enter its name and the service it provides. In this case, it is the Smith household that provides a cleaning service. On the other hand, the household enters the neighbor’s name and service in exchange. Specifically, here, it is the Lee household that provides a plumbing service.
The layout of the...