Kohana PHP framework

You know, I’m a die-hard fan of CodeIgniter. Among a lot of PHP frameworks out there, I prefer CI over Zend, Cake, Symfony etc. because of its speed, efficiency, and most importantly, simplicity. Just download it, unzip into a folder, and call it done. To me, a framework that costs me more than 10 minutes to install is considered failure - Symfony is one.

With simplicity and efficiency being the priority in mind, several days ago, I discovered Kohana and was impressed. As clearly specified on its homepage, Kohana was originally based on CodeIgniter, so CI users should find no difficulties migrating. Then, along its (community-driven) development way, Kohana has grown quite a bit, and now looks like a very promising PHP framework. Among its features:

  • Highly secure
  • Extremely lightweight
  • Short learning curve
  • Uses the MVC pattern
  • 100% UTF-8 compatible
  • Loosely coupled architecture
  • Extremely easy to extend


And the things make it stand out from the crowd:

  1. Community, not company, driven. Kohana development is driven by a team of dedicated people that need a framework for fast, powerful solutions.
  2. Strict PHP 5 OOP. Offers many benefits: visibility protection, automatic class loading, overloading, interfaces, abstracts, and singletons.
  3. Extremely lightweight. Kohana has no dependencies on PECL extensions or PEAR libraries. Large, monolithic libraries are avoided in favor of optimized solutions.
  4. GET, POST, COOKIE, and SESSION arrays all work as expected. Kohana does not limit your access to global data, but offers filtering and XSS protection.
  5. True auto-loading of classes. True on-demand loading of classes, as they are requested in your application.
  6. No namespace conflicts. All classes are suffixed to allow similar names between components, for a more coherent API.
  7. Cascading resources offer unparalleled extensibility. Almost every part of Kohana can be overloaded or extended without editing core system files. Modules allow multi-file plugins to be added to your application, transparently.
  8. Library drivers and API consistency. Libraries can use different “drivers” to handle different external APIs transparently. For example, multiple session storage options are available (database, cookie, and native), but the same interface is used for all of them. This allows new drivers to be developed for existing libraries, which keeps the API consistent and transparent.
  9. Powerful event handler. Observer-style event handlers allow for extreme levels of customization potential.
  10. Rapid development cycle. Rapid development results in faster response to user bugs and requests.

You can tell that, originally a fork from CodeIgniter, Kohana should inherit the best from CI when having many improvements. Yes, it’s true. First, it’s PHP 5, so you can take full advantages of the new features available in this version. Second, it doesn’t limit your data in POST and SESSION as CI does (by default, CI disables GET, and it was a nightmare for me trying to integrate Google Custom Search into my CI-based website). Third, it has cool libraries, with the most powerful being ORM, which is a must-have for serious enterprise application.

With this being said, I’ll not dust away CodeIgniter anytime soon. Nevertheless, CI is already mature, with a good userbase, when Kohana is still in its beginning phase and thus has true support limitations. Both have their own pros and cons, so while sticking with CI, I will start playing around with Kohana.

To my readers: please spread the words! Kohana is definitely a very promising PHP framework. By featuring it on your own blog, you’re helping an free, useful, open-source, community-driven application grow. That also is contribution :)

  • symfony takes about 1 minute (or less, if you use the sandbox) to install.

    Last time I checked CI, it had a sad ORM (if we can call that an ORM..). Now I don’t know if something has changed..

  • It might be worth mentioning that although it was originally a fork of CodeIgniter it no longer uses a single line of CI code.
    I came from CI originally too. I found it hugely accessible and now consider it the perfect starting off point for anyone getting into mvc frameworks. Eventually it was actually the CI community that drove me away in the end. I switched when I found the forum had become so watered down that it no longer offered an advantage over the much smaller but far more focused Kohana community.
    You can compare feature sets all day long but looking at the source code for Kohana really tells you all you need to know. It’s just really well thought out and well coded.

  • Hey there! I’m a big, big fan of Kohana. Like yourself I also came from a CI background and loved it! I recently rewrote Afrigator.com in Kohana and its been nothing but a pleasure! I try and blog some Kohana tips & tricks every now and again and you might find it useful to follow the Kohana tag over at http://stii.co.za/tag/kohanaphp/

    Cheers and keep spreading the word!

  • Greetings from East Africa in Obamaland (Kenya) via my Nokia celly. This was a most informative post. I can’t wait to jump aboard the Kohana train. I will definitely spread the goood word. PHP is definitely moving up the “enterprise” ladder. My hats off to the Kohana team & its spirited community. - Maxwell

  • A fantastic read….very literate and informative. Many thanks….where is your RSS button ?

  • Thanks for the great information ……

    i would definitely try kohana

You can follow any responses to this entry through the RSS 2.0 feed.

Trackbacks / Pingbacks