I’ve worked with all the major players in the PHP framework space, and there are good and bad takeaways from all of them. My goal isn’t to bash on any of the others, because they all have fairly equal strengths and weaknesses.. some obvious and others not so much. This post will instead be focused on one of my favorite frameworks, Kohana.
Holy Light Footprint, Batman!
What initially intrigued me about Kohana was the fact that there were so many credible developers raving about it, and the size of the whole framework was under a meg! Previous to Kohana, I had been doing nearly every project in Zend, so a 60M footprint didn’t really phase me after a while.. and to see a framework that small made me immediately question how powerful it could really be; but within install and reading docs, I was off to the races building powerful web apps with such a tiny footprint.
After diving into the framework on a few large projects, I’ll sum it up this way.. Kohana is like the frame of a house.. which a framework honestly should be. It doesn’t include the drywall or insulation, but since the frame is so solid, yet lightweight.. the house can be shaped and formed in any manner then the extras can be added on. Compared to the modular home that Zend and CodeIgnitor offer, this truly is a different framework.
Yet something familiar..
The next thing I noticed is it felt a lot like CodeIgnitor, even though it was also very different. When I started seeing syntax similarities, I investigated to find that the Kohana team stemmed from the CI team a while back. What doesn’t matter is the politics of the separation, but what does matter is that Kohana was geared to utilize PHP5 from day one. This fact also made me beyond words excited to start building projects.. as I’ve watched PHP5 start to become more OOP but had yet to really see it in action or throw away my bad habits. Long story short, this boy has started OOP’ing everything because of it. Goodbye MVC and linear and hello HMVC and sub-classing.
But the best part
The complaint I hear the most is that “Kohana’s documentation sucks” which honestly just makes me laugh. What I love about Kohana is that it quickly brings out the fools of developers who need examples to write “Hello world” or tutorials to do CRUD operations on a database. Kohana is a very thoroughly and thought out framework, but yes.. it is lacking in examples. That’s because the classes and commenting in Kohana is meant to be the documentation. They built the manual right into the product, which is a feature we’re ALL SUPPOSED TO DO if we’re good programmers!! Am I right?!? I’ve found that looking up documentation is as easy as a shortcut search within my IDE and quickly grabbing what I need. I don’t use a book, no snippets or cheatsheets; because they’re all unnecessary.
Kohana PHP
Kohana is by far my number one choice when it comes to building most small to medium scale websites or applications. It’s proven capable time and again, and if my opinion counts for anything, then take my advice on this one.. you won’t regret it (unless you’re a bad programmer).
