Codeigniter - SPLessons

Codeigniter Tutorial

Home > Lesson > Chapter 1
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Codeigniter Tutorial

CodeIgniter Tutorial

shape Introduction

CodeIgniter was the most popular open source, application development PHP framework that structures the code and make complex tasks less tedious. It provides mostly required features with a set of built-in libraries. The present chapter Codeigniter Tutorial discusses about MVC, HMVC and main advantages of CodeIgniter.

shape Description

PHP follows MVC(M-Model, V-View, C-Controller) and an MVC extension namely, HMVC (H-Hierarchical, M-Model, V-View, C-Controller) folder design architectures.

MVC

MVC is the native CI architecture with a single Model, View and Controller. Features like Modularization, Organization, Re-usability, Extendablity features are not present in MVC.

HMVC

HMVC is the modular extension of CI architecture with modules folder where various project modules are placed. Project Modules are groups of independent components, each divided into model, controller and view following MVC structure again.
  • Modularization: Reduction of dependencies between the modules(ex: login module, admin module, registration module) of the application as explained above.
  • Organization: Having a folder for each of the module makes for a lighter work load, fast output and less loading time.
  • Re-usability: By nature of the design applications are easy to reuse.
  • Extendability: Makes the application more extensible without sacrificing ease of maintenance.
So, finally as a result using HMVC for larger applications will be effective and fast compared to MVC.

History

shape Invention

CodeIgniter was first developed by Rasmus Lerdorf and was first released by EllisLab, a software company on Feb 28th,2006. The latest version Codeigniter 3.0.3 was released recently on Oct 31st,2015. From Oct 6th,2014 to present CodeIgniter was being developed under British Columbia Institute of Technology. Codeigniter Source code is being maintained at GitHub(a Web based Git repository hosting service which stores codeigniter source code)

Why CodeIgniter?

shape Description

Codeigniter makes coding simple, quick and user-friendly because of its predefined and inbuilt methods(Functions), Libraries, Helpers which wraps up several lines of PHP code into few lines within methods and those methods can be called with a single line of code wherever and whenever needed in the website.
  • Codeigniter consists of easy folder structure with all database queries packed in Model folder and all View pages packed in View folder and all controlling methods in Controller folder and all libraries and helpers, hooks and so on packed in various individual folders which makes applications easy to maintain.
  • CodeIgniter is easy to learn as this is an opensource which means the source code of codeigniter is made available with free of cost to general public with excellent documentation as user guide.
  • Using CodeIgniter, synergistic, spontaneous, interactive, and proficient websites can be made in no time.
  • Installation, configuration and customization for own requirements is quite easy here.
  • CodeIgniter supports all browsers like Safari, Google, Mozilla, IE and all databases like Oracle, MySQL, SQL etc.
  • CodeIgniter was accomplished with a standard Error Handling techniques at production and development levels which helps to control the errors and report the failure at minimum level.
  • In CodeIgniter, template system is very powerful and very easy to perform any action which separates the PHP and HTML so that layouts can be changed easily.
  • Most secure and hack free sites can be achieved by using built-in classes and libraries.

Summary

shape Key Points

"Codeigniter Tutorial" chapter draws out following important points.
  • CodeIgniter is a PHP framework.
  • MVC and HMVC models are followed by CodeIgniter.
  • Developed by Ellis Lab in 2006.