Model view controller MVC
The Model View Controller MVC is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller.
- Each of these components is built to handle specific development aspects of an application.
- MVC is one of the most frequently used industry-standard web development framework to create scalable and extensible projects.
- It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.
- Traditionally used for desktop graphical user interfaces (GUIs), this architecture has become extremely popular for designing web applications.
Fig: The Model View Controller MVC pattern
- The Model component corresponds to all the data-related logic that the user works with.
- This can represent either the data that is being transferred between the View and Controller components or any other business logic-related data.
- For example, a Customer object will retrieve the customer information from the database, manipulate it and update it data back to the database or use it to render data.
- The View component is used for all the UI logic of the application.
- For example, the Customer view will include all the UI components such as text boxes, dropdowns, etc. that the final user interacts with.
- Controllers act as an interface between Model and View components to process all the business logic and incoming requests, manipulate data using the Model component and interact with the Views to render the final output.
- For example, the Customer controller will handle all the interactions and inputs from the Customer View and update the database using the Customer Model.
- The same controller will be used to view the Customer data.
MVC is one of the most frequently used industry-standard web development framework to create scalable and extensible projects. Hope you understood the topic clearly.
390 total views, 5 views today
A Soon-to-be Computer Engineer by profession, he has profound devotion to add Data Scientist as a prefix to his name. He’s been to the nooks of the web (at least of the surface web) and planning to add some real figures in his pocket!