Hey Folks, unfortunately, I don’t get much time to write articles these days, as I’m working on a very critical project which requires more attention. The project is actually a website which I’m developing to handle Online Programming Contests. Its not a full-fledged Online Judge system, but rather much like Google Code Jam in the way it works. Its still in the development stage, but I’m planning to extend it into a full-fledged system, after the Online C/C++ Programming contest, which I’m managing, finishes on April 1, 2011. So, I thought why not discuss a bit about it, and tools I’m using to develop it.
I’m familiar with PHP/MySQL only, as far as the development part of the data-driven dynamic websites are concerned. So, before I started working on this new project, I was looking for a perfect PHP framework to start with, as I was low on time, and had to develop it real quick. In case if you’re confused about the term Framework, it is basically a structure, a backbone on which the websites are developed. It provides certain set of inbuilt files, rules, methods, classes etc. which we can easily use in our website. Using a framework makes it a lot easier to develop websites, and saves a lot of development time coding each and every part of the website starting from scratch.
I usually develop websites on WordPress, and Joomla but that’s about normal websites. This project is much rather a complete Application. And if you’re developing a Application, you have to keep few things in mind – High Performance with Less Overall Size (including Database, Files etc.). I could have easily opted for Joomla or WordPress, but I was sure that I won’t be using much of their core functions and files, and that would add a tremendous amount of extra bulk to my website (Large Overall Size, with Low Performance). So, I started researching about other PHP basic frameworks, and my research came to an end with two frameworks as the end result – CodeIgniter, and Yii. Though there are many other frameworks like Zend, CakePHP, Symfony, Kohana etc. but I was also looking for one which is Powerful, has a Short Learning Curve, and a very Thorough & Good Documentation available . That’s why I stick to both CodeIgniter and Yii at first.
I tried installing both on my local machine with LAMP installed, with Yii first. It just took me 2 steps to be able log into my new project from Web-browser i.e. 2 step installation before you can start working on an application. First, I extracted the files to /var/www, and Second, I used a command line tool provided with Yii (Yiic) to install the basic structure of my project. That’s it, and I was very impressed. Then, I tried installing CodeIgniter. I extracted the files, and tried to open it from my Web-browser but it showed up 503 error, even though everything was perfect – Apache, File Permissions etc. And I found a few more posts on the Internet related to the same error on localhost. So, I had no other option but to start working on Yii, as I didn’t have much time to research about the CodeIgniter problem, and Yii looked quite impressive at first. I don’t criticize CodeIgniter in any way, and there are a lot of developers happily using it, but Yii diverted my attention away from it. If you want a Detailed Comparison between CodeIgniter and Yii, refer to this article.
I’m using Yii Framework for quite a few days now, and things which I found impressive about Yii framework are:
- Easy 2-step Installation.
- Clean and thorough Tutorials and Documentation with large Community base. In fact, if you’re willing to start using Yii, follow this tutorial by Larry Ulman – The best I found so far, on the Internet, from a beginner’s perspective.
- Uses MVC (Model-View-Controller) Framework structure, which is very popular these days among Web applications. I’ll be explaining MVC in a separate post later on.
- It generates Model, View, and Controller files for your application project by just accessing the database. So, after the installation, the next step you need to do is to create a Database schema for your application, and use the Gii tool provided with Yii Framework files, to generate those files from the Database schema – The part I liked most about Yii. Thus, most of the basic frame of your application is generated by Yii within minutes, without requiring your assistance in writing a single bit of PHP code. Other things it generate by default, are a Captcha enabled Contact form, and a Simple Login system, which can be customized as per your requirements.
- Yii also provides built-in jQuery support, and supports AJAX for many operations such as Form validation, File Upload, dynamically updating page portion, etc.
- Supports extensions to enhance the functionality of your application. There are increasingly number of extensions available on the Yii Framework’s website.
VN:F [1.9.13_1145]
Rating: +9 (from 9 votes)