Choosing PHP Framework


PHP FrameworkPHP4PHP5MVCMultiple DB'sORMDB ObjectsTemplatesCachingValidationAjaxAuth ModuleModulesEDP
Akelos Visit Akelos download url talk Akelos at forumAkelos Support PHP4Akelos Support PHP5Akelos Support MVCAkelos Support Multiple DBAkelos Support ORMAkelos Support DB ObjectsAkelos Support TemplatesAkelos Support CachingAkelos Support ValidationAkelos Support AjaxAkelos Support Auth ModuleAkelos Support Modules-
ash.MVC Visit ash.MVC download url -ash.MVC Support PHP5ash.MVC Support MVC--ash.MVC Support DB Objectsash.MVC Support Templates-ash.MVC Support Validation-ash.MVC Support Auth Moduleash.MVC Support Modules-
CakePHP Visit CakePHP download url talk CakePHP at forumCakePHP Support PHP4CakePHP Support PHP5CakePHP Support MVCCakePHP Support Multiple DBCakePHP Support ORMCakePHP Support DB Objects-CakePHP Support CachingCakePHP Support ValidationCakePHP Support AjaxCakePHP Support Auth ModuleCakePHP Support Modules-
CodeIgniter Visit CodeIgniter download url talk CodeIgniter at forumCodeIgniter Support PHP4CodeIgniter Support PHP5CodeIgniter Support MVCCodeIgniter Support Multiple DB-CodeIgniter Support DB ObjectsCodeIgniter Support TemplatesCodeIgniter Support CachingCodeIgniter Support Validation----














PHP on TRAX Visit PHP on TRAX download url -PHP on TRAX Support PHP5PHP on TRAX Support MVCPHP on TRAX Support Multiple DBPHP on TRAX Support ORMPHP on TRAX Support DB Objects--PHP on TRAX Support ValidationPHP on TRAX Support Ajax-PHP on TRAX Support Modules-
PHPDevShell Visit PHPDevShell download url -PHPDevShell Support PHP5PHPDevShell Support MVC-PHPDevShell Support ORMPHPDevShell Support DB ObjectsPHPDevShell Support TemplatesPHPDevShell Support CachingPHPDevShell Support ValidationPHPDevShell Support AjaxPHPDevShell Support Auth ModulePHPDevShell Support Modules-
PhpOpenbiz Visit PhpOpenbiz download url -PhpOpenbiz Support PHP5PhpOpenbiz Support MVCPhpOpenbiz Support Multiple DBPhpOpenbiz Support ORMPhpOpenbiz Support DB ObjectsPhpOpenbiz Support Templates-PhpOpenbiz Support ValidationPhpOpenbiz Support AjaxPhpOpenbiz Support Auth Module--
Prado Visit Prado download url talk Prado at forum-Prado Support PHP5Prado Support MVCPrado Support Multiple DBPrado Support ORMPrado Support DB ObjectsPrado Support TemplatesPrado Support CachingPrado Support ValidationPrado Support AjaxPrado Support Auth ModulePrado Support ModulesPrado Support EDP
QPHP Visit QPHP download url QPHP Support PHP4QPHP Support PHP5QPHP Support MVCQPHP Support Multiple DB-QPHP Support DB ObjectsQPHP Support Templates-QPHP Support ValidationQPHP Support AjaxQPHP Support Auth ModuleQPHP Support ModulesQPHP Support EDP
Seagull Visit Seagull download url Seagull Support PHP4Seagull Support PHP5Seagull Support MVCSeagull Support Multiple DBSeagull Support ORMSeagull Support DB ObjectsSeagull Support TemplatesSeagull Support CachingSeagull Support ValidationSeagull Support AjaxSeagull Support Auth ModuleSeagull Support Modules-
Symfony Visit Symfony download url talk Symfony at forum-Symfony Support PHP5Symfony Support MVCSymfony Support Multiple DBSymfony Support ORMSymfony Support DB Objects-Symfony Support CachingSymfony Support ValidationSymfony Support AjaxSymfony Support Auth ModuleSymfony Support Modules-
WACT Visit WACT download url talk WACT at forumWACT Support PHP4WACT Support PHP5WACT Support MVCWACT Support Multiple DB-WACT Support DB ObjectsWACT Support Templates-WACT Support Validation--WACT Support Modules-
WASP Visit WASP download url -WASP Support PHP5WASP Support MVC--WASP Support DB ObjectsWASP Support Templates-WASP Support ValidationWASP Support AjaxWASP Support Auth ModuleWASP Support Modules-
Yii Visit Yii download url talk Yii at forum-Yii Support PHP5Yii Support MVCYii Support Multiple DBYii Support ORMYii Support DB ObjectsYii Support TemplatesYii Support CachingYii Support ValidationYii Support AjaxYii Support Auth ModuleYii Support ModulesYii Support EDP
Zend Visit Zend download url talk Zend at forum-Zend Support PHP5Zend Support MVCZend Support Multiple DBZend Support ORMZend Support DB ObjectsZend Support TemplatesZend Support CachingZend Support ValidationZend Support AjaxZend Support Auth ModuleZend Support Modules-
ZooP Visit ZooP download url ZooP Support PHP4ZooP Support PHP5ZooP Support MVCZooP Support Multiple DB-ZooP Support DB ObjectsZooP Support TemplatesZooP Support CachingZooP Support ValidationZooP Support AjaxZooP Support Auth Module--


  • MVC: Indicates whether the framework comes with inbuilt support for a Model-View-Controller setup. 
  • Multiple DB's: Indicates whether the framework supports multiple databases without having to change anything. 
  • ORM: Indicates whether the framework supports an object-record mapper, usually an implementation of ActiveRecord. 
  • DB Objects: Indicates whether the framework includes other database objects, like a TableGateWay. 
  • Templates: Indicates whether the framework has an inbuilt template engine. 
  • Caching: Indicates whether the framework includes a caching object or some way other way of caching. 
  • Validation: Indicates whether the framework has an inbuilt validation or filtering component. 
  • Ajax: Indicates whether the framework comes with inbuilt support for Ajax. 
  • Auth Module: Indicates whether the framework has an inbuilt module for handling user authentication. 
  • Modules: Indicates whether the framework has other modules, like an RSS feed parser, PDF module or anything else (useful).
  • EDP: Event Driven Programming.New!



Why Yii Framework is better than Kohana PHP


I started playing around with both Yii and Kohana in the two PHP IDEs that I use, Eclipse PDT + Aptana and NetBeans PHP.  Yii played very nice with both, because it seems the developers also use these IDEs and hence thought about something that’s very important to serious PHP developers IntelliSense / Code Completion.  Yii handles code completion perfectly and I can easily press F3 in Eclipse PDT or right-click Navigation->Go to Declaration in Net Beans PHP to go into the source object and see what’s going on.  In Kohana however, this is not possible and that’s a MAJOR NEGATIVE, because it makes learning the framework so much more difficult as you don’t have code completion.  This stems from how Kohana does auto-loading (and it’s not alone, I’ve seem the same problem in the custom framework that OpenCart uses).  Basically it uses a registry and a loader class but there isn’t a one-to-one relationship between the class name and what it’s called when used.  For example, the html helper in Kohana is declared as html_Core, while when used it’s usually html::somestaticmethod.  Because html_Core is not html the IDE can’t make the connection!  Also, why does Kohana use lowercase for helper classes?  The standard is generally to use ProperCase for class names and camelCase for variables (and usually for functions).  This issue with IDE support is in itself for me a reason to choose Yii over Kohana!
Other things that make Yii the better choice for me are the fact that when I use it, it just feels natural!  It’s like the lighter version of .NET and Zend and with CodeGeneration capabilities so I don’t have to write everything by hand.
Performance wise both are about the same, but I’ll write a separate post on performance as I benchmarked both.
Regardless, all other thigns aside, the lack of proper IDE Code Completion support in Kohana is a deal-breaker for me and is a big enough reason to choose Yii Framework over Kohana!  Unless you’re already super familiar with Kohana or are stuck in the dark ages (or think you’re tool l33t for an IDE), using Yii will greatly improve the speed with which you’ll be able to get up and running with a new framework.  Combine that with code generation that Yii provides and you’re onto a winner unless of course it doesn’t meet some other needs that you have and you prefer to roll your own (which requires a significant investment of time and skill).

A real case

For a project I am working to, I have considered a few solutions to improve the code and be ready for high scalability by increasing coding productivity as well. The first I did is to research a bit about PHP MVC frameworks, their features and drawbacks:
Then I looked for performance benchmarks made by other users. Soon I realized that every project’s official site tends to present their product as clearly the best. Therefore, I have mostly considered third party studies like:
After reading a while, I decided that a good candidate would be Kohana or Yii, because both are light enough, while well documented and rich in features, that is, the best balanced from the output of the research done. The next step I did then was to test them against a raw PHP script on a local server.

The benchmark

To set up the benchmark, I have installed a MAMP environment on a MacBook computer. The results and specifications of the machine are not relevant on themselves, so I will focus on the relative performance between applications. The software used to run the tests is JMeter, a free tool from the Apache project, written in Java and therefore, cross-platform.
The test consisted on a basic script that connected to a database to get 100 results from a table and showed them on a HTML page. I run the battery with and without APC, and the following table shows the results:
Without APCWith APC
usersrps%usersrps%
PHP500269100%1200400100%
Kohana120843.2%100031278.0%
Yii1002212.2%90028972.3%
PHPro MVC40026598.5%---
Limonade40011342.0%---

Please note: the first three technologies have been tested with and without APC. This has thrown light over the fact that, despite using APC raises the selected MVC’s performance to an acceptable level, there is also a considerable lose regarding raw PHP.
The last two ones have been run on a second series, after I decided that, despite I am planning  to use APC, it was better to compare the frameworks on their basic installation. Despite using APC is a good idea, it has to be applied to every view generation on a widely manner, so it is better not to rely all the application’s performance on the right use of this tool, but on a certain basis. These two cases (PHPro MVC and Limonade) have been chosen for their low footprint, despite their lack of extensions migh increase the time investment.

Conclusion

As I said before, choosing a framework for your web application is not a trivial task. Normally, any of the most well-known applications would be more than useful. Frameworks like CakePHP, Zend, Yii, Kohana and Code Igniter are well documented, maintained by a big community, rich on features and – some more than others – are considerably fast. Only in some very precise and critical situations we would like to choose some home brew PHP code, and in that case whether Limonade, whether our own PHP MVC framework (and PHPro MVC is a good base architecture to start with) would be the solution we are looking for.
It’s up to you, what are your experiences with high load websites and PHP Frameworks? Which one do you prefer? Comments are welcome :)

23/03/2011 Update




Popular posts from this blog

เทคนิค ชนะ เกมเศรษฐี 14 ตารวด!!! ( Let's get Rich )

Using Google Chrome Inspect Element to Analyze the website

Easy way to download whole youtube play list and convert them to mp3