48

I'm new to both platform and my main decision factor is : Which one of the two will help me create and finish my first website(s) quicker?

By that I mean - Better set of helpers, responsive and friendly support from the community, easier to find snippets. Integration with jQuery, available ready themes and code samples, better documentation etc....

88

I've developed several applications using both. Here is the conclusion I've come to:

  • CodeIgniter is, without a doubt, the most well-documented and approachable PHP MVC framework out there. CakePHP's documentation is also very good, but the learning curve is slightly higher.

  • CodeIgniter's models are optional and serve no function other than code separation. There's no integrated CRUD and its "Active Record" class is really just an alternative SQL syntax. It also doesn't support table associations. So, you will be building many large queries essentially from scratch. CakePHP's models are far more advanced and similar to those in Ruby on Rails. It supports table associations, has integrated CRUD, and behaviors. In addition, CakePHP has command line tools (Bake) that allow you to generate all the code for basic CRUD operations. Tweak a few things here and there and you've got a working prototype in minutes.

  • CodeIgniter lacks some essential libraries that are needed in most applications (i.e. Authentication and ACL). You will need to rely on 3rd party libraries in many of your applications. CakePHP has integrated Auth and ACL, but both frameworks integrate with 3rd party libraries easily.

  • Since CodeIgniter lacks much of the automation that CakePHP brings, there are no strict conventions to follow (this can be viewed as good or bad). This makes CodeIgniter a more flexible framework. Furthermore, its lack of features and automation do give it an advantage when it comes to speed. CodeIgniter is one of the fastest PHP MVC frameworks out there. That said, the framework is rarely the bottleneck in your in application...and you should be choosing a framework based on productivity, not its execution speed.

  • Both frameworks have large and helpful communities. CodeIgniter has their official forums and an IRC channel. CakePHP has a google group and an active IRC channel. CakePHP is currently the most popular PHP MVC framework with the largest community behind it.

In conclusion, if you want a fast, flexible, well-documented framework, and don't mind writing extra code and relying on 3rd party libraries, go with CodeIgniter. If you want a powerful, feature-rich framework that does most of the heavy lifting through automation, and you don't mind having to follow strict conventions, go with CakePHP.

84 accepted

I've used them both extensively, and here is more or less my take:

CakePHP

+ Solid support (irc.freenode.org @ #cakephp can be very helpful)
+ Great documentation
+ Shades of RoR if you are into that
+ Good amount of plugins available
- Generated queries can become unsightly
- Overall pretty large overhead

CodeIgniter

+ VERY small footprint
+ Greater control of application flow
+ Great documentation
+ Very little configuration
- Not quite as many plugins available
- Less automagic in some places

Overall, I have met people that live and die by both of them. They both have their place in my heart so I'm not really going to "pick a side" - just take a look at both of them and decide which one is for you. Please also note that the minuses I put under both are things that are very easy to overcome, just kind of giving an overview of my personal experiences.

8

Here is a good benchmark comparison of some PHP frameworks, speed-related.

Here's one that's more recent. Still 18 months behind, but at least the link isn't dead:
http://www.phpframeworks.com/news/p/49/php-framework-comparison-benchmarks

4

I never used codeigniter but I can say that CakePHP it's easy and quick to start with. My guess is that you should do the tutorials on both website. The blog tutorial is great to start with but doesn't show all you can do.

By default, CakePHP use the prototype libs, but I head there is a port of the Ajax helper to JQuery. The community of CakePhp is awesome. If you need help. Log on irc.freenode.org and go to the #cakephp channel. You should get answered within minutes.

There is no real configuration to do to be up and ready with cakephp. What I like the most about CakePHP is how you don't need to write SQL to find complex stuff. You can add behaviour to your models to make them do special stuffs.

But there is only one way to find out really what choice do you prefer the most. Try them out both.

4

CodeIgniter is everything you need and nothing you don't. It's the perfect place to start writing a custom web-application. I'm not comparing this against CakePHP though, as I've never really dug into Cake PHP.

What CodeIgniter is missing is a Joomla style extensions website where programmers can share their hooks, helpers, and libraries.

3

I use cakephp and have only tried a tutorial of CI. I think that if you want to finish your site faster, cakephp has more things like mvc code generation, the magic where everything just works when you setup your models correctly. Also the bakery, book.cakephp.org, IRC, google groups, and many blogs will help you hit the ground running. The community is mostly friendly and there are a lot of people who are very willing to help.

2

Both frameworks are great, but I find CodeIgniter better in terms of performance.

2

I can agree with the view points on both frameworks. But as always whats feature rich isn't always good and vice versa.That being said, CakePHP has many helpful features, but that costs something in both performance and complexity. The same can be said about CI, except that I personally find it much faster to learn and integrate.

Yes, it lacks in ACL and many other things but it makes up for all of that in performance and its lightweight enough to just pop in and go.

Every time I think about using cake in an app, I always think about its performance and how well it will handle when under pressure. Keep in mind that this is not a necessarily a bad reflection on cake. I just personally, want to get in, design, integrate my design, test and launch

1

Here is my take on this discussion.

If you are working with a large data model, building lots of screens, you will want CAKE. Most of this type of work is done in large companies.

If you are building your screens without so much database stuff, but links to other sites (and even their data), with a lot of javascript, then I like CI.

Having done both tutorials, CI has a way cooler and a better explained manual. CI is just SMOOTH. Cake is not bad, but makes a lot of assumptions that they assume you should now, so you have to go look a lot of stuff up.

What I don't understand, is why CAKE, with that big development group, does not have near the coolness of CI ... in the web site.

0

I have experience with codeigniter and now I am trying to learn more deeply cakephp as other frameworks like Yii. I thing that cakephp is better in many cases than CI (as this page already writes) but some benchmarks say that CI is much faster.

0

both frameworks are very good but i like to work in ci.because it is light weighted and simple to use ..