In this tutorial, we will learn about CodeIgniter MVC framework. Basically, MVC is an advanced development approach by which we can isolate the business logic from the presentation layer.
MVC is very easy to understand if you have core concepts of WEB development.
When the user will request a specific page the request goes to the controller from the Browser. Then the controller will load models and extract data from the database. That data is passed on to the views which are present in the response of user request from the controller. In the following image, you can clearly understand the workflow of the CodeIgniter MVC framework.
Models – these classes represent the user-defined structure of database and users to exchange information.
Views – mostly it is a web page which contains the information extracted from the database with the help of models. During the development of web application, you can also use this be used as a fragment within your main views such as the header and footer.
Controllers – these classes control the whole flow of the application. In simple words, you can say that it is a middle layer between models and views.