Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Understanding MVC!
You have completed Understanding MVC!
Preview
MVC is an acronym that stands for Model, View, Controller. It isn't a language or a specific technology. It's a way of thinking about and structuring a computer program.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
HI, I'm Jonathan,
a teacher here at Treehouse.
0:09
In this workshop I'll introduce you to
a common pattern used in many different
0:12
programming languages and
programming frameworks.
0:16
Very popular tools like Laravel for PHP,
Ruby on Rails, Pythons Django framework,
0:20
ASP.NET, iOS, Express in JavaScript and
0:26
Spring for Java all use the MVC pattern or
some close variant.
0:31
But what exactly is MVC?.
0:37
MVC is an acronym that stands for
Model View Controller.
0:40
It isn't a language or
specific technology,
0:45
it's a way of thinking about and
structuring a computer program.
0:48
We call it a programming pattern.
0:52
A programming pattern is a way of
organizing a programs logic to handle
0:55
common tasks or solve problems.
0:59
Most web applications
perform similar tasks.
1:01
A visitor requests a page from a website,
for
1:05
example, requesting information
about the movie Toy Story from IMDb.
1:08
The website collects
the information from a database,
1:14
all the facts about Toy Story when it was
released, who stars in it, and so on.
1:18
The site organize that
information into a presentation,
1:23
the layout of the webpage with
specific data and photos and finally,
1:27
sends that web page back to the visitor
who views it in their browser.
1:31
That same pattern is true whether you're
IMDB, Amazon, Facebook or Google.
1:36
Each site does different things, but
1:43
those basic tasks are common
between all of them.
1:45
The MVC pattern provides a way
of organizing common tasks
1:49
into very clear responsibilities.
1:52
The C or controller handles all
communication between the user and
1:55
other parts of the application.
2:00
The M, or model,
handles and retrieves data.
2:02
While the V, or view, organizes that
data into a visual presentation.
2:06
While this may sound like unnecessary
organization, in the next video
2:11
I'll explain why you'd want to use the MVC
pattern to build your applications.
2:16
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up