Have a web project that you need done fast and you need it done right? Oh what’s that, you are also a fan of many of the concepts behind Ruby on Rails but want to find a PHP spirited equivalent?
Well, you may want to give Yii a looksy as it is my personal OOP PHP framework of choice for rapid development.
Here are my top five reasons – in no particular order – on why Yii is so stinkin’ awesome!
Demos
The demos are easy for you to work from and they provide a great place to observe someone else’s code at work. The also provide a pre-built Yii VMware virtual machine that you can download and jump right into the development mix with.
Testing
From the ground up, Yii is built and integrated tightly with the amazing unit testing library PHPUnit. I wasn’t too stoked about Unit testing when I started, but Yii really proved its value to me.
Not only does it make me feel accomplished after writing a great test, but dudes, I sleep so much better at night.
Communtiy
The forums are awesome, I mean really awesome. The folks there are happy to respond to any question you have, as long as you provide your code and a decent description of what your are running up against.
Extensions
Yii is modular and extending it has always been a core concept. With the healthy way that Yii lazily loads its modules and libraries, the community has really rallied around creating some awesome extensions.
I personally subscribe to the Yii extensions RSS feed just to see what goodies everyone has been making.
Documentation
Hands down, Yii’s documentation is some of the best I have ever seen coming from a PHP framework. And they are updated all the time. If something changes in the core, guess what, the documentation reflects that instantly.
Not only are the reference API documents amazing, but Yii’s definitive guide gives context to everything that Yii is about. It is a great place to start reading, and then bouncing into their wiki if you need to.
Source Code (Bonus!)
If you look through the source, it is insanely clean and easy to understand. Need to work with the user, utilize the CUser class. Or how about some HTML for creating your views, may want to check out CHtml.
Another awesome thing is that comments are also at the beginning of every method and object. These same comments can be referenced from the website as well. How. Sweet. Is. That?
AR & Scopes (Double Bonus All The Way!)
Active Record and Scopes while not new concepts are very effective when done right. The Yii CActiveRecord class is something of pure beauty. If you use AR’s in Ruby On Rails, you will be right at home here.
The use of scopes is also a must have when trying to limit, well, the scope for your objects. Make sure to check that out as well.
dewde says
This looks sweet, thanks Jared!
peace | dewde
Jared Folkins says
Glad you like it! Seriously helps you bust stuff out.
-laterz
yii framework says
Best summarized, I agree with you.
thanks for sharing.
Marc says
I love Yii framework too! My website is built in Yii framework. I think it’s the coolest PHP framework ever.