MVC (Model View Controller)
An architecture use to build applications. Following are three main logical components of MVC: the model, the view, and the controller.
Model
- They hold data and its related logic.
- It handles the object storage and retrieval from the databases for an application. For example: A Controller object will retrieve the employee information from the database.
- It manipulates employee data and sends back to the database or uses it to render the same data.
View
- View handles the UI part of an application.
- They get the information from the models for their display. For example, any employee view will include many components like text boxes, dropdowns, etc.
Controller
- They handle the user interactions, figure out the responses for the user input and also render the final output.
- For instance, the Employee controller will handle all the interactions and inputs from the Employee View and update the database using the Employee Model.