CodeIgniter Application Architecture
×

CodeIgniter Application Architecture

0 1014

With high component singularity, Codeigniter is a dynamically operated loosely coupled system. It has simplicity, flexibility, and high performance in a small footprint package.


Related Topics:

CodeIgniter Introduction
CodeIgniter Features

Codeigniter Application architecture

If we look inside the folder after unzipping the file which we download according to the previous step, we should see the following directory tree:

We can divide it into three main parts:

  • Application
  • System
  • User_guide

1 Application: This folder contains all development code related to the project. This folder contains all models, views, controllers, helpers, cache files, configuration files, and libraries.

Let's discuss the all-important directories in details:

  • Cache: This folder stores all cached files so that the loading time of pages will decrease.
  • Config: This folder contains all the Codeigniter application configuration files, which are covered in Configurations and Naming Conventions.

  • Controllers: This folder contains all the controllers of the Codeigniter application project. A controller is a basic unit in MVC (Model view controller) architecture that full fill the request of the user and present the relevant data to the user.
  • Core: This folder contains all base classes of the Codeigniter application.
  • Helpers: This folder holds all the helper classes and user-defined code of the Codeigniter application. A helper file is a collection of independent procedural functions in a particular category. Each helper function performs one specific task, with no dependence on other functions.
  • Hooks: This folder contains the hooks which are used to add some extra functionality in the Codeigniter application without changing the core files.
  • Language: All language-related files are stored in this folder.
  • Libraries: All development files of the user are stored in this folder. A Codeigniter library is a PHP class. The scope of the library can be any project resource, such as helpers, models, controllers, and views. For example, a library can provide Facebook library API services to simplify the application code for Facebook integration.
  • Logs: All logs related files are stored in this folder.
  • Models: This folder stores all the application model files. A model is the component of MVC architecture that operates the data stored in the database. In Codeigniter, a model is a class designed to work with the information in the database.
  • Third_party: This folder contains all third-party plugins.
  • Views: All HTML files are stored in this folder which is loaded by controllers on user requests.

2 System: This is the root of the Codeigniter core directory.

The system folder contains important system components in the subfolders, such as core, database, helpers (built-in system helpers), and libraries (built-in system libraries).

3 User_guide: This folder contains guidelines that are available offline to help the user.

4 Index.php file: This file is used to set the application environment and error level and other important functions such as: set the default application folder name.


Related Topic:

Codeigniter Interview Questions


Best WordPress Hosting


Share:


Leave a Reply


Comments
    Waiting for your comments