Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an MVC framework and why is it necessary/useful?

I know that an MVC framework allows you to separate business logic, data base access and presentation, but why do we need a framework to do this.

Can't we just keep our classes separated, perhaps using different packages/folders for the model, view and controller classes?

like image 460
Ankur Avatar asked Oct 31 '09 15:10

Ankur


People also ask

What is MVC and why is it useful?

MVC, short for Model, View, and Controller, is a methodology or architectural pattern used for efficiently relating the user interface to underlying data models and organizing to relate the application code. MVC is primarily used to separate an application into three main components: Model, View, and Controller.

Why do we even need MVC frameworks?

The MVC architecture empowers you to develop different view components for your model component. As you can witness an ever-increasing demand for new ways to access your web apps, MVC architecture is your one-stop solution for developing different view components.

Where is MVC framework used?

A general explanation of how MVC works. It was used for desktop graphical user interfaces but nowadays is used in designing mobile apps and web apps.

What is MVC and explain advantages and disadvantages?

MVC stands for Model-View-Controller, and it is a methodology, an architectural pattern, or a software architecture design used in the software or application development process. MVC divides an application into three main components: Model, View, and Controller, where each of them handles specific responsibilities.


1 Answers

In my opinion the thing you are talking about is the MVC pattern and not a specific framework. Of course you can go and keep all your classes within one project and still use the MVC pattern, as you have all your UI code in the views, the logic in the controllers, ...

A MVC framework on the other hand makes it easier for you to use this pattern. It may provide some base classes for controllers and a mechanism for the communication between view and controller.

I don't know if you are familiar with ASP.NET MVC. The framework itself is very small, but it helps you developing an application with the MVC pattern, as you don't have do think about the previously decribed areas...

Hope this helps

like image 92
ollifant Avatar answered Sep 18 '22 07:09

ollifant