The following diagram shows the flow of interaction between the user, controller, model, and view. ![]() It allows you to work with the model, and hence, the business logic of the application, regardless of the visual presentation. While the view and controller depend on the model, the model is independent of the presentation or the controller. There is an easy way to understand MVC-the model is the data and its business logic, the view is the window on the screen, and the controller is the glue between the two. The main idea of MVC is about separating an application into three parts: model, view, and controller. The Model-View-Controller (MVC) pattern serves as the basis for software architecture that will be easily maintained and modified. When you add new features and the application code clutters, it becomes much harder to understand how it works and to modify it, especially for a newcomer. Many applications start from something small, such as several hundred lines of code prototype of a toy application written in one evening. ![]() (For more resources related to this topic, see here.)
0 Comments
Leave a Reply. |