CodeIgniter MVC Framework
×

CodeIgniter MVC Framework

0 1317

Codeigniter is based on MVC architecture. MVC stands for "model-view-controller". In the MVC pattern, the application logic is isolated from the presentation. It is a software approach that provides the facility to split the entire source code into three major parts: model, view, and controller.


Related Topics:

Introduction to Codeigniter
Codeingiter Interview Questions

MVC Framework:


  • Model: It represents data structures that help to retrieve, insert and update the information into the database. These are operated by the controller. A model in Codeigniter is a PHP class that is designed to work with the information in the database.
  • View: It represents the information presented to the user. A view can be a page or a small part of any page. It can be a webpage or an RSS (Really Simple Syndication) page. The view is the HTML content executed by the user browser that presents and interacts with the user.
  • Controller: A controller is a basic unit in MVC architecture that full fill the request of the user and presents the relevant data to the user. It works as an intermediary unit among the model, view, and any other processes needed to process the HTTP (HyperText Transfer Protocol) request.

1 A controller in Codeigniter is a class extending a base class of the Codeigniter controller.


Related Topics:

Codeigniter controllers
Views in Codeigniter
Models in Codeigniter

2 The class methods can be executed or called with a proper URL (Uniform Resource Locator).

3 The file which works as a controller should have the first letter of the name in uppercase.

Note:

Codeigniter has a loose approach to MVC. Models are not necessarily required in Codeigniter. In Codeigniter, you can also develop your application by using only controllers and view. It will reduce the complexity of your application and make it minimal to maintain and update.



Best WordPress Hosting


Share:


Leave a Reply


Comments
    Waiting for your comments