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 frameworks to create scalable and extensible projects.
MVC Components
Model: 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 its data back to the database or use it to render data.
View: The View component is used for all the UI logic of the application. For example, the Customer view would include all the UI components such as text boxes, dropdowns, etc. that the final user interacts with.
Controller: 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 would handle all the interactions and inputs from the Customer View and update the database using the Customer Model. The same controller would be used to view the Customer data.
1. Separation of concerns:
a. The separation of the three components allows the re­use of the business logic across applications.
b. Multiple User Interfaces can be developed without concerning the codebase.
2. Developer specialization and focus:
a. The developers of UI can focus exclusively on the UI screens without bogged down with business logic.
b. The developer of Model/business can focus exclusively on the business logic implementations, modifications, updations without concerning the look and feel and it has nothing to with business logic.
3. Parallel development by separate teams:
a. Business logic developers can build the classes, while the UI developers can involve in designing UI screens simultaneously, resulting in the interdependency issues and time conservation.
b. UI updations can be made without slowing down the business logic process.
c. Business logic rules changes are very less that needs the revision/updations of the UI.
Last Updated: 01/09/2020 04:38
A total of 6 / 10 users found this article useful.