The full form of MVC stands for Model-View-Controller. MVC (Model-View-Controller) is a typical software design paradigm for implementing user interfaces, data, and controlling logic. It emphasizes a division between the business logic and the appearance of the software. This “separation of concerns” allows for better labour-force distribution and better upkeep. Model-View-Presenter, Model-View-Whatever, and MVVM (Model-View-Viewmodel) are a few more design patterns that are based on MVC.
Model View Controller Example
Table of Contents
Consider a basic grocery list app. All we need is a list of each item’s name, quantity, and price for this week. We’ll go over how we could use MVC to provide some of this functionality below.
The three parts of the MVC software-design pattern can be described as follows:
- The Model – Controls business logic and data
- The View – Manages display and layout
- The Controller – Routes instructions to the model and views parts
The Model
The model specifies what data the app must have. The view and occasionally the controller will be notified by the model if the state of this data changes.
The View
The view specifies how the data from the app should be presented.
The view would specify how the list is displayed to the user in our shopping list app and would get the data to display from the model.
The Controller
The app users’ input is processed by the controller’s logic, which modifies the model and/or view.
Our shopping list, for instance, might feature input fields and buttons that enable us to add or remove goods. The input is given to the controller, which updates the model as necessary and delivers the updated data to the display. These operations require the model to be modified, thus the input is sent there.
Must Read – What is the Full Form of NTG?
For more information, keep reading about various full forms in our general knowledge section!