Thursday, August 2, 2012

7 reasons to switch from Drupal to Yii

Written by "the CTO of a site that switched from Drupal to Yii in 2010."  It's clear from the article that his focus is on developing "applications" rather than hosting content.

  1. Drupal isn't the best way to avoid starting from scratch
  2. If Drupal is a framework, only Rube Goldberg could love it
  3. Community-contributed modules are prone to featuritis and the bugs that result from unneeded complexity
  4. Drupal has PHP 4 baggage
  5. Don't want Drupal 6 or 7 to slow down a Drupal 5 site? Deal with an outdated jQuery
  6. Drupal's field API/content construction kit (CCK) will drive you crazy, and it's part of Drupal 7 core
  7. Drupal is a LOT slower than Yii.

What's Yii?  It's an object oriented application development framework.  This blog post does a decent job of describing its attractiveness .. ..  One key thing said is that PHP only acquired good object oriented programming features with PHP5, meaning that any framework designed prior to that date simply could not have proper object oriented designs.  Cough, cough, that's one of the principle objections I have to Drupal, that the programming model is so completely strange.

He found that only ZendFramework ( and Symfony ( had a good quality object oriented design.  But neither had support for event oriented programming.  He then found the PRADO framework ( which then led him to Yii (

Advantages to Yii

  • 100% OO architecture. It is really good application design.
  • Authentication & roles mechanism
  • Caching techniques
  • DB access, which is based on PDO
  • Active record and relational active record implementation
  • Validation – that is really, really nice. To create quite complex register form (check if login is unique, if email is unique, email match with confirmation, passwords match, validate integer/string values, check empty fields and give nice error messages for each field you need only template (view) and model with rules defined. It took me 10-15 mins to do that!)
  • Component concept. Just to give an idea, why is it nice – you can define getter and setter methods for properties, you can define read-only properties for components, define and invoke events, attach event handlers and additional features to the class without modifying it, just by attaching additional behaviour to it

No comments:

Post a Comment