MVC stands for Model-View-Controller and it’s the most popular way to organize and separate the different functions of a web application.
In MVC you have three parts of your app, each of which serves a different function.
First, you have to define what each part of the web app is and how the different parts will work together. The Model defines what data you will have in your app, the relationships between that data, and how you will use it.
For example, if your web app is a blog, the Model says that there are blog posts and users, and defines the relationship between the two (users write blog posts).
Second, the View defines what the app looks like. In the View you define what is on each page and style it up fancy so that people love to visit your website!
Third, you have to connect the Model and the View together. It’s all well and good to let your Model define your data, and your View to determine how that data looks, but without the Controller never shall the twain meet.
The Controller tells the View about all the parts defined in the Model (blog posts and users), it connects the View and the Model to the database, and ferries information between all three. And every time the user does something (like writing a new blog post) the controller lets everyone know.
The goal of MVC is to separate the app logic, from the app database, and the app look so your app code is nice and tidy and easy to edit. MVC is the organizing principle used by most PHP frameworks, Ruby on Rails, DJango, and many many others.
Cocktail Party Fact
Traditionally, Models, Controllers, and their good friends the databases, made up the backend of a web application. The Views, on the other hand, made up the frontend.