Kohana 3.x vs 2.x

The Kohana PHP framework currently has 2 versions which are both under active development. These versions are known as Kohana 2.x and Kohana 3.x. The upgrade changes are not trivial and the API has changed significantly. Therefore, these are not successive versions and for all purposes should be considered two different frameworks.

Doubts on 2.x

Think about if you are willing to take the risk for going with a 2.x version: “Kohana 2.3 is deprecated and no longer supported, and Kohana 2.4 is on hold. If you would like to become the new project manager and fix some of the problems you are complaining about, feel free to contact zombor.” Thread

What does Kohana 2.x and 3.x have in common ?

  • Both frameworks have grown out of the Kohana PHP Community
  • Both frameworks share the same support forums
  • Both are highly secure, loosely coupled and easy to extend
  • Both are strict PHP 5 OOP frameworks
  • Both are 100% UTF-8 compatible
  • Both share the same database abstraction capabilities
  • Both frameworks have reached their initial release milestones
  • Both frameworks will remain in active development and be fully supported for some time to come

What are the main differences between Kohana 2.x and 3.x ?

  • Both frameworks have their own development team and goals
  • Kohana 2.x uses the MVC design pattern while Kohana 3.x uses the HMVC design pattern
  • Kohana 2.x is built off the foundation of previous Kohana 2.x versions, while Kohana 3.x is a completely new framework with no legacy foundation
  • Previous documentation for the 2.x versions of Kohana will largely still be applicable when working with the latest Kohana 2.x releases, while Kohana 3.x is building a new documentation base to assist developers working with the 3.x framework.

What Version of Kohana Should I Use

The version of Kohana that you should choose is largely going to be a personal choice based on how you like to develop, how you like to use a framework and what your previous experience is with both Kohana and PHP frameworks in general.

From the standpoint of which framework is faster, which is more secure or which framework is more stable, there is no real difference between the two. Both frameworks employ the best practices in OOP programming and development and both are equally capable of supporting large scalable solutions.

Here are some questions you might wish to ask yourself to help determine which framework is better for you.

Do you have an existing Kohana application ?

If you're starting a brand new project then you should consider using the Kohana 3.x framework.

If you have an existing application that uses the 2.x code base then you may want to consider using Kohana 2.x unless you want to rewrite the vast majority of your code. Kohana 3.x shares very little with the 2.x code base and employs many new conventions. An “upgrade” from a 2.x application to 3.x is simply not possible. If you're going to move a 2.x application to Kohana 3.x then you'll want to take the opportunity to redesign your application.

Do you like using full example applications when learning a framework ?

Because current Kohana 2.x releases are a successive version of the 2.x code base a lot of the existing documentation found online for Kohana is still applicable. If you're a beginner at PHP and frameworks you might find more tutorials that take you step by step through building an application for the 2.x versions of Kohana.

The documentation sources and available tutorials for Kohana 3.x is growing daily. They include this Wiki, the official Userguide, the API Browser and the support forums. Some developers will find these sources of information more than sufficient for learning how to use the framework and begin building solutions.

If you have already given this Wiki a good read and checked out the official userguide and still find yourself confused on where to start or how to use Kohana 3.x, then you should consider using the 2.x version of the framework.

Do you prefer to work with HMVC or MVC design patterns ?

If you want to use HMVC design patterns in your application then you should choose Kohana 3.x for your development. Kohana 3.x does an excellent job of supporting the flexibility of HMVC. For a primer on HMVC see :: HMVC in Kohana

If you prefer to use MVC design patterns exclusively then you will find that both Kohana 2.x and 3.x are capable of meeting your needs. The both share a similar approach to supporting this design pattern.

what_version_of_kohana_should_i_use.txt · Last modified: 2010/10/01 06:23 by slm17