Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is MVC (Model View Controller)? [closed]

I've heard the term MVC (Model View Controller) tossed about with a ton of Buzz lately, but what really is it?

like image 871
Chris Pietschmann Avatar asked Sep 24 '08 20:09

Chris Pietschmann


People also ask

What is MVC in simple words?

MVC (Model-View-Controller) is a pattern in software design commonly used to implement user interfaces, data, and controlling logic. It emphasizes a separation between the software's business logic and display.

What is MVC What does each part represent?

-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. -It is invented by Trygve Reenskau.

Why is MVC used?

MVC is primarily used to separate an application into three main components: Model, View, and Controller. This level is considered the lowest level when compared with the View and Controller. It primarily represents the data to the user and defines the storage of all the application's data objects.

What is the model in MVC pattern?

MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application's concerns. Model - Model represents an object or JAVA POJO carrying data. It can also have logic to update controller if its data changes.


2 Answers

You might want to take a look at what Martin Fowler has to say about MVC, MVP and UI architectures in general at Martin Fowlers site.

like image 94
Ruben Avatar answered Sep 21 '22 04:09

Ruben


I like this article by Martin Fowler. You'll see that MVC is actually more or less dead, strictly speaking, in its original domain of rich UI programming. The distinction between View and Controller doesn't apply to most modern UI toolkits.

The term seems to have found new life in web programming circles recently. I'm not sure whether that's truly MVC though, or just re-using the name for some closely related but subtly different ideas.

like image 35
Luke Halliwell Avatar answered Sep 20 '22 04:09

Luke Halliwell