Codeigniter vs FuelPHP
It’s amazing the difference a year can make. This article is pretty outdated now, I’ve since written a follow-up which addresses the comparative points of both frameworks a little easier and in-depth. Both frameworks have evolved since I wrote this, check out the updated comparison here.
I’ve been getting a lot of traffic off Google from people searching “Codeigniter vs FuelPHP”, so I thought I would write a post explaining the advantages and disadvantages of each. Whilst FuelPHP might appear to be a new kid on the block, the similarities between Codeigniter and FuelPHP aren’t that much in terms of performance, coding or speed.
- It has a small foot print
- Can be infinitely extended
- A developer who knows PHP and understands MVC and easily debug and develop a Codeigniter application whether it be a new one or an application another developer built
- Codeigniter has a large community behind it
- A lot of helpers, libraries and additional s can be downloaded for it like; Modular Extensions and Datamapper. Although it would be nice if this were built in.
- Great and in my opinion unrivalled documentation.
- Easy to learn and understand. There are hundreds of applications out there you can use as a learning reference both paid and free. EllisLab use Codeigniter to power their own flagship products.
- No automagic loading for libraries or helpers.
- No authentication library
- No in-built ORM. Codeigniter comes with an over-glorified query builder.
- Has yet to fully take advantage of PHP 5 features, so things like getting an instance require calling a function and storing the value in a variable are still common place, even though PHP4 support was dropped.
- Does not support the HMVC (hierarchical-module-view-controller) pattern without downloading a third party library like Modular Extensions or Modular CI.
- Codeigniter’s autoloading is not true autoloading as Codeigniter will always load a class set to be autoloaded even if you don’t use it which can cause bloat.
- Really lean and fast.
- Takes advantage of PHP static variables and functions. A lot of class functions can be called statically or via instantiated means like Codeigniter.
- Has a powerful driver based authentication library with Simpleauth and ACL.
- Super powerful ORM baked in.
- Everything can be extended because everything is effectively a class, this includes the entire core.
- Utilises name spacing which means you can have multiple classes of the same name under different namespaces.
- Out of the box HMVC (hierarchical-module-view-controller) functionality, so you can break your code up into modules (Codeigniter users familiar with Matchbox, Modular CI or Modular Extensions will be familiar with this)
- Might be a bit too much to understand for a beginner to intermediate Codeigniter user or PHP developer due to how the file system is laid out.
- It’s still a relatively new framework which could have caveats that have yet to rear their heads. Although, I encountered no problems when I used it.
- Documentation is still sparse, a lot of sections are still incomplete.
- The community is rather small and there aren’t really many applications built with it you can learn convention from (yet).
- Things like name spacing which is relatively new to PHP might be hard for a Codeigniter developer that hasn’t really been exposed to them before, so the slashes in function names might confuse people.
- The amount of developers contributing to the framework is quite low in comparison to Codeigniter or any other PHP framework for that matter, which means one developer quits contributing and the framework could suffer immensely.
The bottom line is that Codeigniter and FuelPHP are two completely different frameworks with different end goals in mind.
Comparing them to one another is like comparing a manual transmission car to an automatic transmission car. They’re both cars, they both get you from A to B, one just has more parts and technical engineering involved.
If you know Codeigniter and don’t feel comfortable with Fuel upon initial glance or you’ve tried Kohana before which shares a similar file system layout, stick with Codeigniter and learn Fuel on your downtime.