404 Tech Support

Experiences with Three PHP Frameworks in Brief

I’m by no means a PHP developer but I do like to tinker around with it on the side for fun projects on my own and very rarely if something comes up at work. (A lot of my work involves filling in the gaps. Why just last week I was a Visual Basic 2008 programmer again.) Before embarking on my next project, I decided to check out some of the PHP frameworks I’ve heard about to look into learning those for all the benefits that a framework provides. Over the past few nights, I’ve tried CodeIgniter, Yii, and Kohana.

CodeIgniter

CodeIgniter was the first framework I tried out. It was easy to download, easy to configure, and easy to get started with. Before I got too invested in the system, I wanted to do my research and look around. A number of reviews I read that compared different PHP frameworks cited limitations CodeIgniter inherited by remaining PHP4 compatible whereas other PHP5 only frameworks didn’t have those compromises.

Everybody raves about how good the documentation is. While I found the documentation to be of high quality, it was only after I found the User Guide’s Table of Contents that it was really helpful. The one question I had that the documentation couldn’t answer and I found many other people asking online was ‘Where do you go after you finish installing it?’

The install instructions consist of essentially 3 simple steps:

  1. Download and unzip the CodeIgniter package.
  2. Configure the config.php and database.php files as needed.
  3. Upload the package to your server and then visit index.php on your server.

That takes you to the page seen below. “Now what?” is a question I saw very frequently in the comments section of many blogs writing about CodeIgniter or documenting the ‘getting started’ steps. This is where you dive in and start coding. You don’t have a GUI or an IDE that you’re working in, a framework provides a structure to code faster. I think some screenshots of developing web apps misled people into thinking this might be closer to other packages you install to your server with at least a configuration page.

I found the video tutorials to be very good to help take those first steps into using the framework. Unfortunately they are slightly out of date as it looks like some variable/setting names have changed with newer versions.

Yii

Yii was the next framework I was going to look into. Unfortunately, I didn’t get very far with it. I read about it and looked at some documentation for it. I uploaded it to my server and was at the step to configure it but found that it is setup using the command-line on my server to configure it. The command line would have just complicated things further down the road and made a higher initial cost just for checking it out from my hobbyist perspective. It would have been easier if I was running the server on my local machine but that just adds more to the initial setup.

Kohana

Kohana sounded like it could be what I set out to find. It forked from CodeIgniter and was built to take advantage of PHP5. Unfortunately at the time I downloaded it (trying multiple times and from multiple computers) all of the second-level directories were empty. For example, the config.php file wasn’t there to modify that the documentation was advising me to change in step 2 of the installation instructions.

After feeling like I had wasted time for the past two evenings looking into frameworks, I skipped it and just started coding. It was nice to make some progress than keep spinning my wheels. I’d be interested if others have high recommendations for certain PHP frameworks with benefits that would be worth my looking into again.