Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Model View Controller (MVC) is a design pattern for computer software. It can be considered an approach to distinguish between the data model, processing control and the user interface. It neatly separates the graphical interface displayed to the user from the code that manages the user actions. The objective is to provide a framework which enforces better and more accurate design.
MVC architecture helps to split applications into logical units. In simple terms, this paradigm separates business logic from interface logic. This architecture makes the application more effective.
The model represents a unique entity - it could be a single object or more likely a structure. There is a one to one relationship with the entity and the object's data. It is the model that responds to requests coming from the view regarding its status or state. In this way, the processing of data takes place only in the model, which ensures internal data consistency.
The view is used to present the graphical visualization of the user interface. It could filter out some aspects of the model or highlight others. It represents the input and output data in an interface using various elements such as pushbuttons, menus, dialog boxes, etc. To see the status of the application objects, the view queries the model through the controller.
The controller provides the link between the user interface (view) and the application processing logic (model). The controller uses the model methods to retrieve information about the application object, to change the status of the object and to inform the view about this change. In a sense the controller enables a user to make changes and see results.