When comparing CodeIgniter vs Li3, the Slant community recommends CodeIgniter for most people. In the question“What are the best PHP frameworks?” CodeIgniter is ranked 7th while Li3 is ranked 8th. 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
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.
Pro Well documented
The documentation is clear, structured and thorough. It explains both commonly used and CodeIgniter specific concepts and always with clear examples.
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.
CodeIgniter has a small footprint, just 3MB and that's including the user guide.
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.
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 Unified relational and non-relational database API
Lithium has unified the relational and non-relational database APIs into a single one. Being one of the few frameworks to do it.
Pro Robust plugin architecture
Lithium makes use of PHP namespaces to create a powerful plugin architecture. Almost every component of the framework is replaceable.
Pro Fast Bootstrap & Autoloader
This framework loads faster than most due to its class autoloader. It is flexible as well and handles older classes - but requires the developer to define transforms here for naming convention, includes, etc. Many other frameworks use Composer for autoloading and that significantly slows down their bootstrap time because Composer's autoloader is extremely compatible without much developer interaction (it does not require as much involvement for autoloading legacy libraries). So it's a trade-off, speed vs. a little bit of up-front work.
Pro Integrated unit testing
Lithium comes with integrated unit testing. It also has a test dashboard.
Pro Aspect inspired filter system
Lithium's filter system is based on the paradigm of Aspect-oriented programming which aims to increase modularity by separating cross-cutting concerns and helping speed up development.
Pro Great for building an API
Lithium can return JSON and many other formats from the same actions that render templates increasing productivity in many cases. It handles a "type" key in the route which allows it to render various responses with different Content-Types. This is incredibly useful and easy to extend. This combined with closures in routes makes Lithium a very good framework for building a RESTful API.
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 not 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.
Con Less than ideal documentation
Documentation is scattered so it takes a little while to learn and figure some things out.