When comparing CodeIgniter vs Symfony, the Slant community recommends CodeIgniter for most people. In the question“What are the best backend web frameworks?” CodeIgniter is ranked 13th while Symfony is ranked 19th. 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 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.
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 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 Open Source
Symfony is open source and released under the MIT license.
Pro Easy debugging with a built-in debug toolbar
Symfony comes with a built-in toolbar that helps developers debug their applications during the development phase.
The toolbar is also extendable and new components, called panels can be added if needed to help with the debugging process.
Pro Great plugin ecosystem
One of the greatest strengths of Symfony is it's amazing and large plugin ecosystem, which comes as a result of it's large and dedicated community. Having a large number of plugins means less development time and more productivity.
Pro Powerful event system
Symfony has a powerful built-in event system that allows you to add flexibility to applications and makes it easier to maintain the codebase down the road.
Pro Highly active community
Symfony has one of the most active communities out of all the PHP frameworks. This is shown by the high number of commits made every day in the GitHub repo.
Pro Teaches you good practices
Symfony makes you be a better programmer. You have to deal with the latest object-oriented design patterns such as service-oriented architecture, dependency injection, interface abstraction, and so on.
Pro Uses YAML/XML/PHP/Annotation
Symfony makes use of XML, YAML or PHP annotations to create configurations in order to tell Doctrine on how properties of a certain class should be.
Pro Great templating engine
Uses Twig, which is a simple and easy to learn templating language that can also be used as a standalone engine, outside the framework.
Pro Uses Doctrine ORM
Symfony makes use of the Doctrine ORM to add an abstraction layer over the database in order to maintain flexibility without having unnecessary code duplication.
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.
Too many configurations.
Con Doctrine ORM
Symfony Standard Edition, which is the most widely used distribution, comes integrated with Doctrine, the most resource hogging ORM library.
Con Very hard to install
Setting it up on webhost without a console is difficult.
Con Promotes bad development practices
Such as annotations via comments.
Con You need a lot of files to display a single page
For a simple hello world page you need about 5 files.