CodeIgniter Application Architecture - CodeIgniter

What is CodeIgniter Application Architecture?

The architecture of CodeIgniter application is shown below.

codeigniter architecture

  • As shown in the figure, on every occasion a request comes to CodeIgniter, it will first go to index. Personal home page.
  • Within the 2nd step, Routing will decide whether or not to skip this request to step-3 for caching or to pass this request to step-4 for protection check.
  • If the requested page is already in Caching, then Routing will pass the request to step-3 and the reaction will go again to the user.
  • If the asked page does now not exist in Caching, then Routing will pass the requested page to step-four for security assessments.
  • Earlier than passing the request to application Controller, the security of the submitted statistics is checked. After the safety take a look at, the utility Controller hundreds of vital models, Libraries, Helpers, Plugins, and Scripts and pass it on to View.
  • The View will render the page with available data and bypass it on for Caching. because the requested web page became now not cached before so this time it is going to be cached in Caching, to process this page quick for destiny requests.

What is Directory Structure of CodeIgniter?

The image given below shows the directory structure of the CodeIgniter.

directory structure

CodeIgniter directory structure is divided into 3 folders −

  • Application
  • System
  • User guide


Because the name suggests the application folder incorporates all of the code of your application that you are building. This is the folder in which you may develop your assignment. The software folder contains numerous different folders, which are explained below −

  • Cache − this folder consists of all the cached pages of your application. those cached pages will increase the general pace of having access to the pages.
  • Config − this folder includes diverse files to configure the application. With the assist of config.php file, user can configure the utility. The use of database. Hypertext Preprocessor report, consumer can configure the database of the utility.
  • Controllers − this folder holds the controllers of your application. It’s far the fundamental a part of your application.
  • Middle − this folder will include base class of your software.
  • Helpers − on this folder, you could put helper class of your software.
  • Hooks − the documents on this folder provide a method to tap into and adjust the internal workings of the framework without hacking the center documents.
  • Language − this folder incorporates language related documents.
  • Libraries − this folder incorporates documents of the libraries evolved to your utility.
  • Logs − this folder includes files related to the log of the machine.
  • Models − the database login could be placed in this folder.
  • Third-party − on this folder, you could location any plugins, so that it will be used to your application.
  • Perspectives − software’s HTML documents may be located on this folder.


This folder incorporates CodeIgniter middle codes, libraries, helpers and different documents, which help make the coding easy. Those libraries and helpers are loaded and utilized in net app improvement.

This folder carries all the CodeIgniter code of result, organized into various folders −

  • Center − this folder consists of Code Igniter’s core elegance. Do not regulate something here. All your paintings will take vicinity within the utility folder. Even in case your intent is to increase the CodeIgniter center, you need to do it with hooks, and hooks live inside the application folder.
  • Database − the database folder incorporates center database drivers and other database utilities.
  • Fonts − the fonts folder carries font related statistics and utilities.
  • Helpers − the helpers folder includes standard CodeIgniter helpers (consisting of date, cookie, and URL helpers).
  • Language − the language folder contains language documents. you may forget about it for now.
  • Libraries − the libraries folder consists of popular CodeIgniter libraries (that will help you with e-mail, calendars, report uploads, and extra). you may create your own libraries or expand (and even replace) general ones, but those may be saved in the utility/libraries directory to hold them break free the same old CodeIgniter libraries stored in this precise folder.

User guide

That is your user guide to CodeIgniter. It is essentially, the offline version of user manual on CodeIgniter website. The usage of this, you'll examine the features of diverse libraries, helpers and instructions. it's far encouraged to go through this user manual earlier than building your first net app in CodeIgniter.

Beside these 3 folders, there is one extra critical record named “index. Hypertext Preprocessor”. In this document, we will set the software environment and blunders stage and we will outline machine and application folder name. It is recommended, no longer to edit those settings if you do no longer have enough information approximately what you'll do.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

CodeIgniter Topics