Kohana PHP Framework: First impressions
I've been working with the Kohana PHP Framework at my full-time job lately. I'd really love to bash Kohana since I'm a loyal CakePHP fan but frankly, I'm pretty impressed with Kohana. Here are some things I've noticed while using Kohana and how it compares to CakePHP.
Kohana is lighter
The first thing you notice when downloading Kohana is how much smaller the framework is. Uncompressed, Kohana weighs in at 1.6MB on disk and CakePHP weighs in at 8.9MB. (At least those are the numbers that Snow Leopard is reporting)
Kohana is full of features
Just because its lighter doesn't mean that Kohana doesn't come with solid set of features. The core functionality, included helpers and libraries should be enough to get any site off the ground relatively quickly and rival some of Cake's core functionality and methodology.
Kohana is faster, but...
In regard to speed, Kohana wins out over CakePHP. I've done some testing on my server and I can squeeze out many more requests per second using Kohana. Although this doesn't mean much. In my experience, the database has always been the bottleneck for my applications and CakePHP has performed well also.
Some of the perks
Below are some of the perks that I have found while working with Kohana in this short time:
- Strict PHP5 OOP.
- Class auto-loading
- A sweet validation class
- The query builder is pretty cool and intuitive.
- Kohana's form helper only outputs the form element itself. As opposed to CakePHP, where it outputs a bunch of additional html by default (kind of annoying).
- In a related note to the point above, Kohana doesn't assume that you want a lot of "auto-magic-ness" by default. I like this minimalistic approach much better.
So far so good
I've so far enjoyed working with Kohana but there are still some areas in which I still prefer CakePHP. There's no doubt that CakePHP is a more robust framework and I'll try to point out where Kohana is lacking and what can be improved.
Kohana's weaknesses: Things I've noticed in this short time using Kohana
- Small community.
- Common complaint: Upgrading to newer versions will almost always break existing code.
- Not the "popular kid" on Google. Searching for Kohana related info is limited as opposed to CakePHP.
- The CakePHP paginator is much more robust, allowing for built-in column sorting which saves a lot of time.
- Named parameters in CakePHP rule. IE: /my/url/name:dan - No such luck in Kohana, although you could parse out the url to get the same effect.
- CakePHP shells are awesome. Kohana has limited support for writing command line programs.
- Kohana needs a "bakery"
The verdict (So far)
I can appreciate Kohana for its flexible and minimalistic approach. I've only been using it for about a month but I have grown to like its "style". That being said, CakePHP still has my heart. Who knows, that may change after a few more months of using Kohana but as of now, I'm still a baker.
Comments (2)
Rafi B.
October 18, 2009, 5:12 amGood luck!
Dan
October 18, 2009, 2:14 pmLeave a comment