When comparing CakePHP vs CodeIgniter, the Slant community recommends CodeIgniter for most people. In the question“What are the best backend web frameworks?” CodeIgniter is ranked 17th while CakePHP is ranked 49th. The most important reason people chose CodeIgniter is:
Setting up CodeIgniter is quick and easy. You can download the version you want from the CI homepage or directly pull the latest version from GitHub. After that, you unzip the contents to the directory that's required. The final step is to edit the `config.php` to suit your needs and it's set up and ready for development. There are also a lot of guides and tutorials from developers who have been using CI for a long time. This is because of the relative old age of the framework and the large community behind it.
Ranked in these QuestionsQuestion Ranking
Pro Built-in ORM that's easy to use
Cake has a built-in ORM which is pretty easy to use and learn. Building queries can also be done very easily and fetching entire columns can be done in one or two lines of code.
Pro Fast development
Developing in CakePHP is very fast and flexible.
CakePHP is about fast and reliable development, it achieves this by following the convention over configuration principle as it's heavily inspired by Rails (which follows the same programming paradigm).
Convention over configuration is all about making it easier for the developer to start immediately writing code without worrying on what's going on "under the hood".
Pro Large library of helper classes
CakePHP has a large library of helper classes with features such as:
Pro Exhaustive list of resources to learn CakePHP
Cake's great community has thrown together an exhaustive and amazing list of resources to get started with CakePHP. It's open source and can be found on GitHub.
Pro Open Source
CakePHP open source and is licensed under the MIT license.
Setting up CodeIgniter is quick and easy. You can download the version you want from the CI homepage or directly pull the latest version from GitHub. After that, you unzip the contents to the directory that's required. The final step is to edit the
config.php to suit your needs and it's set up and ready for development.
There are also a lot of guides and tutorials from developers who have been using CI for a long time. This is because of the relative old age of the framework and the large community behind it.
CodeIgniter has a small footprint, just 3MB and that's including the user guide.
Pro Well documented
The documentation is clear, structured and thorough. It explains both commonly used and CodeIgniter specific concepts and always with clear examples.
Pro Active community
Because it's relatively old and well-liked, it has an active community of developers behind it. It's used by a lot of websites in production.
Pro Open source
The MIT License (MIT)
CodeIgniter is open source and is distributed under the MIT license.
CodeIgniter is tested by hundreds of thousand of developers that use it in production. This means that it's very hard for any bugs or problems to go unnoticed. Even when a new version is out, bugs are quickly found and patched up.
Pro Easy to use templating engine
CodeIgniter has it's own templating engine built-in. It's based on a mustache-like templating language which is easy to learn for new developers who have never seen it. While experienced developers will feel very comfortable using it.
Pro Output caching
CodeIgniter lets you cache the web pages in order to decrease loading times and increase efficiency and performance.
Pro CodeIgniter v4 is a complete rewrite
CI4 will be out soon & is a rewrite..
"CodeIgniter 4 is a rewrite of the framework and is not backwards compatible."
So it will support ALOT more newer functionality built-in.
Because of legacy code, old concepts and prioritizing development speed over everything else, CakePHP is bloated and slow.
CodeIgniter was first released during the times of PHP 4. This means that a lot of features that were added later to PHP are not available. Some of these features are:
- Support for namespaces
- Modular separation by default
- Procedural function helpers
While nowadays CodeIgniter can be used along the latest version of PHP, these features were not added so as not to mess with backward compatibility. They can still be used with CI, but it requires extending core files to make it work which is a waste of time and energy and requires advanced knowloedge of both PHP and CI.
Con No unit testing
Con It does not have basic functions
Some of the missing features include controller security, filters in forms and modoles, rules of validation, among others.