Skip to content

Yii Framework

I’ve decided to take the plunge and start learning how to use a PHP MVC framework. Based on my years of experience in php I am very familiar with Zend, and its complete family of products (including AWS AMIs). I had originally planned on using Zend as the basis for my project, but as always I did a quick google search to see if anything else out there seems interesting. I found this article comparing Zend, Code Ignitor, and a framework I had never heard about called Yii Framework. The authors discussion regarding Yii definitely perked my interest:

Finally, I come to Yii.  I guess the thing with Yii is that it fits in nicely right between Zend Framework and Code Igniter.  It’s probably not the simplest to learn for a PHP or OO novice, but for an experienced OO developer it’s a breeze.  It has great documentation and if need be you can always inspect the code yourself.  I actually spend quite some time developing in ASP.NET and Yii feels very very similar.  It has used some of the best concepts from ASP.NET and from many other frameworks and because it’s strict PHP5 and strict OO (without crazy hacks that are typical of inexperienced PHP developers) it’s very very easy to learn and understand as long as you understand the basic principles of OOP even if you have little experience in PHP.  The thing with Yii is that it’s more comprehensive than CodeIgniter and better structured, yet smaller and more robust than Zend Framework, requiring a hell of a lot less code to get stuff done, while giving you all the same features and more (e.g. Code generation with Gii).

I also found an article titled The Case for Yii vs Zend which provided the following tidbit:

We have worked with both Yii and Zend in the past, while Zend has been an excellent framework, it has strong commercial ties which increase the cost of application development due to licensed IDE’s, server testing environments and licensed developers. Yii on the other hand has the same features but is completely open in nature and as a result has some very talented people working for it – passionately.

As a big fan of FOSS software, this tidbit was enough reason for me to give Yii a try.

Fastforward 3 days later, and I have completed the quickstart and the build a blog walkthrough. From my days working on Java MVC, I definitely feel right at home using Yii. The separation of the view and model are exactly what I have been wanting to use in php. I still need to setup a proper IDE and set of reference materials, but I believeI have a pretty good start now. I also took a look at Yii extensions looking for a user manager. I was surprised to see 3+ different user managers… All of which haven’t been updated in the last year. We will see how they look this weekend..

Posted in PHP. Tagged with , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK


(required, but never shared)

or, reply to this post via trackback.