what is MVC

What is MVC (model view controller) ?

Model View Controller Definition

The MVC (model view controller) is a pattern on the basis of architecture or design of application. It divides the architecture of web app into three main logical components or objects.

Each components of this pattern is built to handle specific area of application. For example you will separately deal with database queries, user interface (views) and application logic. On the other hand it is possible to write all these things in a single page, But it is complex to handle.  So MVC makes easy to create and accelerate workflow in development of any application.

MVC  components.

There are three components of MVC:

  1. Model
  2. View
  3. Controller


It is main and central component. which deals with information and logic of data in application. You can write code to insert, delete, update and create in model. It primarily acts like a bridge between database and application. It is independent from views, means model doesn’t  contain any user interface information.


The View component is used to write all the user interface logic. This part will display UI components on computer screen. The user interacts with it.  For example any web-page with buttons, drop-downs, boxes and labels etc.


The controller is connecting model and views. It accepts inputs, process it and responds them. It also manipulate the incoming requests. controller interacts with model to render the final output. For example a student will access data from StudentModel (eg. name of a model file) using studentController  and view it.

Examples of MVC Frameworks.

  1. Laravel
  2. codeigniter
  3. Symfony
  4. Zend Framework
  5. CakePHP
  6. Yii
  7. etc…..









Add comment

Highlight option

Turn on the "highlight" option for any widget, to get an alternative styling like this. You can change the colors for highlighted widgets in the theme options. See more examples below.

Your Header Sidebar area is currently empty. Hurry up and add some widgets.