is powerful open source PHP framework based on MVC (Model view controller) pattern. CI (Codeigniter) is faster, light weight and reliable comparing to other frameworks.
If you are beginner in web development with Frameworks and want to learn any framework then I would like to suggest you to startup with Codeigniter. It is light weight framework providing huge set of preset libraries and helpers classes for commonly needed tasks. It’s goal is enables you to build application faster without wasting time in miscellaneous coding as well as enables you to focus on core requirement of project by minimizing amount of code.
It comes with easy debugging of errors that enables you to solve errors faster. By using custom hooks you can easily change flow of execution without changing core scripts of frameworks. It uses Data abstraction layer that supports most commonly used database such as MYSQL, MYSQLI, POSTGRES, SQLLITE, MS SQL, ODBC etc. Active record set let you perform database operation without writing long MySQL queries.
HMVC is pattern that makes Codeigniter a modular MVC framework. Well, Codeigniter supports HMVC by installing extension. It let you to reuse nearly each piece of code from disparate modules.
– Advantages of HMVC with Codeigniter
Updating version of Codeigniter becomes very easy without affecting your code. Just copy your code from old version of Codeigniter and past it to new version. That’s it, after some minor changes [Setting database and libraries] in config file, you will good to go.
– Nice directory organization and better code.
Composer let you manage third party dependencies easily and efficiently.
Huge set of libraries and helper classes minimize code amount and development time. It also allows you to use initialize your own library from ‘application/libraries’ folder.
You can initialize any library using below standard.
// Initializing Library
$this->load->library ('Library Name');
Here, I have listed out mostly used libraries of CI (Codeigniter).
- Caching Driver
- Email Class
- Benchmarking Class
- Shopping Cart Class
- Calendaring Class
- FTP Class
- Encrypt Class
- Config Class
- File Uploading Class
- Encryption Library
Helpers are the set of functions in specific category that performs specific task. Helpers are procedural functions located in
system/helper folder. Unlike libraries you can also create your own helper classes storing in
// Loading helper classes
$this->load->helper (array ('helper class1', 'helper class2', 'helper class3'));
Codeigniter comes with best security features. Let have a look at some of its security features.
- SESSION and COOKIE helper classes that increase security of applicaion.
- Form validation class enables you to validate each and every input entered by site user.
- Encryption classes provides two way encryption with your custom encryption key. A fully secured encryption algorithm should have key with 32 characters.
- Data abdtraction layer let you perform MYSQL operations without using long SQL queries.
magic_quotes_runtimeis turned off so that you dnt now have to remove slashes when retriving data from database.
- XXS filtering (Cross site Scripting filter) prevents hacking related to session and cookies.
- Form validation Library helps you to validate inputs entered by frontend uses.
- Remote code executionCodeigniter prevent remove code execution by preventing direct access of script. Here is code that CI uses to prevent direct access of any script of framework.
if (! defined ('BASEPATH')) exit ('No direct script access allowed');