Category: 

What is MVC?

Article Details
  • Written By: John Lister
  • Edited By: Bronwyn Harris
  • Last Modified Date: 20 August 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The U.S. Coast Guard led the evacuation of more than 500,000 people from Lower Manhattan on 11 September 2001.  more...

September 27 ,  1940 :  The World War II Axis powers formed with the signing of the Tripartite Pact.  more...

MVC, or model view controller, is a technique used in software. Its fundamental purpose is to build a distinction between the way the software handles data, and the way the software interacts with the user. This distinction means that the processes can be handled, developed and checked separately, which can be more efficient.

The process is based on the concept that, at the simplest level, all software carries out the same three-step function. First a user inputs data, then software processes the data, and finally the software outputs the results as a new set of data. A very basic example of this is a user typing “2+2=” into a calculator, the calculator working out the answer, and then the calculator displaying “4.”

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

Ad

The purpose of using MVC is to make it simpler to isolate different elements of a software process. By 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 smoothly without having to also rewrite the other parts of the program.

The model view controller system is widely regarded to have been pioneered in a programming language titled Smalltalk. Created in the 1970s at Xerox, Smalltalk was partially designed to teach people about the object model of computing. Put simply, that involves breaking down a computing task into separate parts and building the program around the way those parts interact. Smalltalk was also an example of dynamic programming, in which a program can be revised even while it is operating.

The MVC system is often used in web-based software such as that used in dynamic, or interactive, websites. In these situations, the view is the code, such as HTML, which is 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.

Ad

You might also Like

Recommended

Discuss this Article

anon257625
Post 9

Even someone like me, who doesn't speak English, can read this article and easily understand everything.

anon151227
Post 5

Very clear, and easy to understand. Thanks a ton.

anon146995
Post 4

It's written simply, thanks.

anon122690
Post 1

It is a very good article and easily understood.

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email