After a bit of a hiatus from this blog I want to get back in the swing of things. Just a quickie this time. If you’re looking for a framework to ease your PHP development you could do a lot worse than checking out Kohana. I’ve been using it for about 6 months and think I’ve found what I was looking for in a PHP framework. Namely something that doesn’t fight against PHP and allows me to build web apps without endless faffing repeating the common tasks.
Some of the highlights for me are:
- Flexible URLs/routing
- SQL query builder, SQL injection protection, ORM if you want it
- Caching options built-in (memcache, file, database)
- HMVC (MVC that can call other controllers)
- It plays well with external libraries
I found Kohana after hitting some friction with CodeIgniter, which seems to be a fairly common situation. I’m not going to get hands on in this post but I’m planning on putting together a few related posts to share my experiences. The documentaion that helped me most when I started was the unofficial wiki and the sites it links to. At the time of writing the wiki was targeted at the 3.0 Kohana release. So you might want to check you’ve got a matching version if you’re just starting out. The official Kohana documentation is here.
A quick word of warning. My biggest annoyance when I was trying to learn Kohana, was finding the right documentation. One of the things I really appreciated about CodeIgniter was the link to the clear relevant documentation at the top of nearly every page on their site. Part of the problem with Kohana is the rapid/API breaking development. Partly I think it’s just poor documentation practices. It seems to be getting better though. At least the outdated documents say they’re outdated now. But the old stuff still seems to be up at the top of a lot of Google results. My advice is go through the unofficial wiki, check the forum, get your hands dirty and stick with it.