Understanding the M/V architecture
Traditionally, the Model-View-Controller (MVC) design pattern is often used when building UIs. As the name suggests, it consists of three terms: Model, View, and Controller. The Model is an independent component with a dynamic data structure and logic, the View is the visual element, and the Controller decides how the UI responds to the user inputs. Before MVC came into existence, developers used to put these components together. It is not always possible to decouple the Controller from other components although developers want to keep them as distinct from each other as possible. MVC design decouples the components to increase flexibility and reuse. The following figure illustrates the components of a traditional MVC pattern:
In the MVC pattern, a user sees the View and interacts with a Controller. The Controller sends data to the Model and the Model updates the View. If...