Home » BLOG » Web development » Creating a Web Application with PHP and CodeIgniter – Part 2

Creating a Web Application with PHP and CodeIgniter – Part 2

category:  CodeIgniter, Web development

In part 2, we will learn what is MVC pattern.

Model-View-Controller (MVC)

CodeIgniter is based on the Model-View-Controller development pattern aka “MVC“. MVC is a software approach that separates application logic from presentation.


The Model represents the data structures (tables in your database). The model classes will contain functions that retrieve, insert and update the data in your database.


The View is the information that is showing to a user. Normally the View is a web page.


The Controller is a glue between the Model and the View.

MVC pattern diagram

mvc pattern
MVC pattern diagram


In CodeIgniter3 tutorial part 2, we learn what is MVC pattern. From the diagram, we learn the Model represents the data structure from the database. We also learn the View represents the web page where the users can see the response from their request. We learn the Controller handles the requests from the user and communicates between the Model and View.

CodeIgniter3 tutorial series: