During the course of the past few months, I have been working on and off on several projects based on the relatively new Kohana PHP Framework.

Although this framework is relatively new, it is based off a well-established PHP framework, CodeIgniter, which I have used extensively, as well as highly recommend.

Kohana, which bills itself as “a PHP 5 framework that uses the Model View Controller architectural pattern. It aims to be secure, lightweight, and easy to use.”, delivers on these claims, in my opinion.

The MVC (Model View Controller) is, in my opinion, the best solution out there for development of most web applications, as it allows developers to write “beautiful”, clean code, allows for separation of the different parts of the code to allow, for example, switching of themes (views) without any changes to the layer that interfaces with the database (model), and allows a great deal of flexibility depending on the different programming styles different developers have.

It also allows for the easy use of most popular code libraries.

For example, I routinely use the Smarty template library in both CodeIgniter and Kohana projects, as well as a wide range of other libraries for authentication, data manipulation, email management, and a wide range of other tasks.

Kohana makes it easy to use libraries that also work seamlessly with other major PHP frameworks, such as the Zend framework or CakePHP.

Since it is coming from the popular CodeIgniter framework, it is based on well-developed code that has withstood the test of multiple projects.  CodeIgniter, in the interest of maintaining support for older versions, is limited in the extent to which it can make a clean break with older technology and programming styles.

Kohana, as a form of spin-off, had an opportunity to discard those features that might hinder development of this framework in the future, as well as build a solid foundation based on the solid infrastructure that CodeIgniter had developed over the years.

One of the main differences is the fact that Kohana is built from the ground up with strict PHP 5 OOP design, which offers “visibility protection, automatic class loading, overloading, interfaces, abstracts, and singletons”, among other benefits.

PHP 5 has been on the scene for many years now, but due to requirements for backward support, many web hosts, PHP frameworks, and developers still support and use PHP 4 extensively.

While PHP 4 is a fine version of the language to use, with development of PHP 6 well under way, it seems a wise option to start phasing out support for PHP 4, in order to take advantage of the many features and benefits that the more recent versions of PHP have to offer.

Kohana also prides itself in being a very lightweight framework solution.  This is actually one of the initial reasons why I was attracted to CodeIgniter early on, as they are both lighter, faster frameworks, compared with other similar frameworks currently on the scene.

While they certainly can be set up to support large, bulky libraries where necessary, the default Kohana installation is relatively lightweight, flexible, and very easy to work with.

The fact that it is a relatively new library also means that the user base, as well as the support for the framework isn’t quite up to the level of CodeIgniter or other major frameworks.

However, for those of us who enjoy working with “new” technology and don’t mind spending some extra time debugging, this is a framework to keep in mind for future projects.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Filed under: CodeIgniterKohanaPHP Frameworks