Skip to content

Basic MVC Concepts#

MVC is a software pattern. It stands for Model-View-Controller. Here is a short brief about Models, Views, Controllers:

Model#

A model is a special class that is used work with database. It represents a single row of a table. Within a model, you can do CRUD (Create-Read-Update-Delete) Operations and other useful stuff.

Controllers#

Controller is a piece of class that holds the application logic. A Controller contains some action methods and each method contains different logic. Optionally controllers can also pass data to the views and return it the user so that the user can see a dynamic webpage.

Views#

Views are the templates of a webpage, we can pass data to the views and represent those data to the user, dynamically.

Back to top