One of my projects is a jokes website. It’s been up for a few years at the domain www.funny-jokes.net and it’s been my most profitable website to date. It’s paid for it’s hosting and more over the time I’ve had it. I’ve been able to develop it in bursts then let it run on auto-pilot thanks to Google Adsense. However, of late I have not done much with it. Therefore I believe it is time to give it the love and care that it needs, and hopefully to see it grow much larger.
While it’s a half decent website, the design could do with a well-deserved make over. In addition, I think the back-end code needs to go. Thinking about my past development on the website, I’ve come to a realisation that I’ve wasted a lot of time on it. Just like a lot of programmers out there, I have been stubborn in the past and jumped at the chance to build a website from scratch. I’ve re-coded and re-designed Funny Jokes too many times. New ideas on how to structure the website coming into my mind every other day. It’s fun to play with new code like that, but after you’d implemented the cool stuff, it gets a bit boring to finish it up. It’s also frustrating to get down to the nitty gritty stuff and find that I didn’t plan far enough ahead.
Well, with my recent attitude of trying new things (Wordpress, Macs) I’ve come to realise that maybe, just maybe, the people who always ramble on about frameworks might actually be right. Thinking about it, it actually makes sense. Using a framework allows you to use a tried and proven methodology for building a website, with core code in place that means you don’t have to reinvent the wheel for every website. I’m short on time at the moment, so this suits me perfectly.
Right, so, I’m going to use a framework. But which one? There are a few out there that many people suggest. CakePHP and Zend Framework come to mind as the most popular. CodeIgniter has also been mentioned to me as a “light-weight alternative”. However, they all have a serious weakness that has kept me away from frameworks. Bloat. Big fat Bloat. Where does this bloat come from? Backwards compatibility. These three popular PHP frameworks still have support for PHP 4. Yuk. PHP 5 has so many advantages over PHP 4 and it’s about time that PHP 4 go away anyway. If I’m developing a new website, I’m going to want to run it on the newest version of PHP (or most recent stable version).
Why not keep the framework up with the times? Backwards compatibility is only awesome when dealing with end-users, for example Windows or Web Browsers. You do it so you do not alienate large portions of your users. However, with frameworks, we’re talking developers here, and more often than not new websites will run on newer PHPs. People with older PHPs will have to use older versions of the framework until they can upgrade (which really shouldn’t be an issue, we’re talking about techie people here).
After a bit of searching around I’ve come across Kohana. It is a light-weight framework (originally based on CodeIgniter) but it’s main advantage is that they don’t care about old PHP versions, so there is minimal bloat and all the latest and greatest features available. At the time of writing, the minimum version if PHP 5.2 and PHP version 5.3 only just came out. It’s strongly built around PHP OOP and uses the MVC design pattern for code.
When you get Kohana working, you’re greated with a sample page with the title ‘Welcome to Kohana’, so I thought that would be fitting for the title of this blog post. Kohana is now my framework of choice as a redevelop funny-jokes.net. Wish me luck!