When comparing Spring MVC vs CodeIgniter, the Slant community recommends Spring MVC for most people. In the question“What are the best backend web frameworks?” Spring MVC is ranked 9th while CodeIgniter is ranked 12th. The most important reason people chose Spring MVC is:
Being the oldest and most used JVM web framework, means that Spring MVC has a massive community of followers who are very helpful and have provided numerous tutorials and answers on SO. Spring even holds an annual conference called SpringOne. The Spring forums and SO are great places to ask and get help about anything Spring related. The website blog and newsletter keep developers informed on every news related with the framework.
Ranked in these QuestionsQuestion Ranking
Pro Spring MVC has a massive community
Being the oldest and most used JVM web framework, means that Spring MVC has a massive community of followers who are very helpful and have provided numerous tutorials and answers on SO.
Spring even holds an annual conference called SpringOne. The Spring forums and SO are great places to ask and get help about anything Spring related. The website blog and newsletter keep developers informed on every news related with the framework.
Pro Spring apps are highly scalable
Applications are meant to scale as the framework is used in large-scale applications worldwide. Components like EhCache are used to scale memory cache and it also contains components used for parallel processing.
Batch enables processing of large volumes of records and job processing statistics.
Pro Great documentation that covers almost everything.
The official documentation covers virtually everything. The official website also has a series of great tutorials in video and text formats. There are links to Github repositories for Spring sample applications and there are also a lot of third-party tutorials out there for the fact that Spring MVC is so widely used by many experienced developers.
Pro Spring has an extensive ecosystem
It is based and is dependent on the Spring Framework, therefore it benefits from tools like for example Roo and Spring Tool Suite and many more tools included in the Spring Framework. All Maven dependencies are available in a public Maven repository.
There are also 3rd-party solutions for Spring, such as MyEclipse which includes scaffolding capability for Spring MVC.
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 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 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.
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.
Con Lacking in UI development
While actually very good and with a very complete and rich feature set to develop and maintain code on the server side, it still doesn't provide any rich framework for building good user interfaces.
Con Updating and code maintenance can be a grueling task if you are a beginner.
Updating your project is manageable if you’re already familiar with the framework and the project itself, but if you’re just diving in it can be a little overwhelming and hard.
Con Complex and not newbie friendly
Spring MVC architecture although simple has a lot of layers and abstractions which can be hard to debug if problems arise. It is also highly dependant on the Spring core.
It's an old and mature framework that has numerous amount of ways to extend and configure it – and this actually makes it fairly complex.
Con Bloated legacy DI API
Spring DI is bloated and rather complex in comparison to CDI.
Con Slow Prototyping
If you are looking to build a quick prototype fast and easy, Spring isn't going to help much. It's very large and quite hard to grasp if you are just beginning with it.
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 It does not have basic functions
Some of the missing features include controller security, filters in forms and modoles, rules of validation, among others.