What’s MVC?

Print anything with Printful



MVC is a software technique that separates data handling and user interaction. It divides a program into three parts: data processing, input, and output. MVC is used in web-based software and was pioneered by Smalltalk.

MVC, or model view controller, is a technique used in software. Its basic purpose is to create a distinction between how the software handles data and how the software interacts with the user. This distinction means that processes can be managed, developed and controlled separately, which can be more efficient.

The process is based on the concept that, at the simplest level, all software performs the same function in three stages. First a user enters data, then the software processes the data, and finally the software outputs the results as a new data set. A very simple example of this is a user typing “2 + 2 =” into a calculator, the calculator processes the answer, and then the calculator displays “4”.

In the MVC system, the way your computer processes data is known as a model. The output of the results is known as a view. The data input by the user is known as a controller. It’s important to remember that the view and controller are the sections of the program that control input and output. The terms usually don’t refer to physical objects such as a keyboard or monitor.

The purpose of using MVC is to make it easier to isolate the different elements of a software process. Using the system, a program is effectively divided into three parts: the data processing, the input process and the output process. This means that changes to one part of the program can be made more easily without having to rewrite the other parts of the program as well.

The model view control system is widely regarded as pioneering a programming language called Smalltalk. Created in the 1970s at Xerox, Smalltalk was in part designed to teach people about the object model of computing. Put simply, this involves breaking down a computing task into separate parts and building the program around how these parts interact. Smalltalk was also an example of dynamic programming, where a program can be reviewed even while it’s running.

The MVC system is often used in web-based software such as those used in dynamic or interactive websites. In these situations, the view is the code, such as HTML, generated by the software after processing a query. For example, on a search engine, the search query box would be the controller and the results page the view.




Protect your devices with Threat Protection by NordVPN


Skip to content