maniuz maniuz - 6 months ago 12
PHP Question

What is the origin of php controller in mvc pattern?

What is the origin of the controller in a OOP PHP application?

Why if I put an url like:

www.mysite.com/index.php/controller=mycontrol&action=insert


The application enters in the controller class and uses the
insert
function?

Is controller a particular keyword of PHP?

Answer

MVC is a software architecture - the structure of the system - that separates domain/application/business (whatever you prefer) logic from the rest of the user interface. It does this by separating the application into three parts: the model, the view, and the controller.

The model manages fundamental behaviors and data of the application. It can respond to requests for information, respond to instructions to change the state of its information, and even to notify observers in event-driven systems when information changes. This could be a database, or any number of data structures or storage systems. In short, it is the data and data-management of the application.

The view effectively provides the user interface element of the application. It'll render data from the model into a form that is suitable for the user interface.

The controller receives user input and makes calls to model objects and the view to perform appropriate actions.

All in all, these three components work together to create the three basic components of MVC.

Reference MVC means