-
Quick start
-
The basics
-
Helper classes
- Benchmark Class
- Cache Class
- Captcha Class
- cURL Class
- Database Class
- Date Class
- Errors Class
- FileSystem Class
- FTP Class
- Images Class
- Language Class
- Logger Class
- Number Class
- PayPal Class
- PHPMailer Class
- Plugins Class
- RestClient Class
- Security Class
- Template Class
- Text Class
- URL Class
- XML Class
- ZIP Class
Model-View-Controller (MVC)
MVC stands for Model, View, Controller. A short answer to your question is as follows:
- Model: The model has (whatever or where) to supply the object, the Web application with data from the database and, if desired, to save the data.
- View: The View includes the management of templates, and generates the HTML output.
- Controller: The controller decides what to do with the given parameters, and controls the application.
Specifically explained
Model view controller. The MVC principle or MVC pattern is like the eve principle a pattern which is applied very often, because it significantly increases the reusability of the code.
And to do it right, you have to know which layer does what.
Model
The model is the only layer in the application able to read and write data. Where the data is, only the model knows. All other layers do not have to worry about data retention. They only call methods that give them the data or store the data.
View
The view gets the data, it should display, supplied by the controller. View and model never have a connection with each other. In Web development, there is, for example, HTML views, which give off a normal website or PDF views that display the data in the form of a PDF.
Controller
The actual logic of the application is in the controller. He fetches the data from the model, processes it, and passes it to the output to the View. In general, the controller does not know where the data comes exactly, nor how they are spent.