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

Creating a Web Application with PHP and CodeIgniter – Part 2

Updated:   CodeIgniter, Web development 1 min read

Your support helps keep this blog running! Secure payments via Paypal and Stripe.


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.

Model

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.

View

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

Controller

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

MVC pattern diagram

MVC pattern diagram

Conclusion

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:


Your support helps keep this blog running! Secure payments via Paypal and Stripe.


Senior WordPress & WooCommerce Developer

Senior WordPress & WooCommerce Developer

I’m a professional WordPress and WooCommerce developer based in Chiang Mai, Thailand, with over a decade of experience creating fast, secure, and scalable websites. From custom themes and plugins to full WooCommerce stores, I help businesses build a strong and reliable online presence. Need a developer you can count on? View my portfolio or get in touch to discuss your project.