Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC (model-view-controller) - can it be explained in simple terms? [closed]

I need to explain to a not-very-technical manager the MVC (model-view-controller) concept and ran into trouble. The problem is that the explanation needs to be on a "your grandma will get it" level - e.g. even the fairly straightforward explanation offered on MVC Wiki page didn't work, at least with my commentary.

Does anyone have a reference to a good MVC explanation in simple terms?

It would ideally be done with non-techie metaphor examples (e.g. similar to "Decorator pattern is like glasses") - one reason I failed was that all MVC examples I could come up with were development related.

I once saw a list of pattern explanations but to the best of my memory MVC was not on it.

Thanks!

like image 936
DVK Avatar asked Apr 13 '10 03:04

DVK


People also ask

Can you explain model controller and view MVC?

-MVC is an architectural pattern consisting of three parts: Model, View, Controller. Model: Handles data logic. View: It displays the information from the model to the user. Controller: It controls the data flow into a model object and updates the view whenever data changes.

What is MVC in layman's terms?

Stands for "Model-View-Controller." MVC is an application design model comprised of three interconnected parts. They include the model (data), the view (user interface), and the controller (processes that handle input). The MVC model or "pattern" is commonly used for developing modern user interfaces.

What is the correct way to describe Model-View-Controller MVC architecture?

The Model-View-Controller (MVC) is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller. Each of these components are built to handle specific development aspects of an application.

What is the main purpose of MVC model-view-controller pattern?

The MVC pattern helps you break up the frontend and backend code into separate components. This way, it's much easier to manage and make changes to either side without them interfering with each other.


2 Answers

How about this - off the top of my head, hopefully it works for you.

MVC can be metaphorically related to a TV. You have various channels, with different information on them supplied by your cable provider (the model). The TV screen displays these channels to you (the view). You pressing the buttons on the remote controls affects what you see and how you see it (the controller).

I was watching TV, so I got some inspiration from there!

like image 100
Tilo Mitra Avatar answered Sep 21 '22 03:09

Tilo Mitra


I don't trust metaphors. But it's not hard to explain it:

  • the Model is the part of the code that knows things
  • the View is the part of the code that shows the things the Model knows
  • the Controller is the part of the code that gets commands from the user and tells the View what to show and the Model what to know.
like image 41
Javier Avatar answered Sep 23 '22 03:09

Javier