Thursday, October 9, 2008

10 PHP Frameworks compared

10 PHP Frameworks compared PDF Print E-mail
Friday, 10 November 2006
New frameworks are being released almost every other day in the PHP community. With over 40 frameworks available it's difficult to decide which framework works best for you, especially as each framework offers different functionality.

In this article we will look at ten popular frameworks, and compare them to each other.

Zend Framework

•    It's still in its beta stage. Features like authentication module are still missing.
•    It has modules to handle PDF files, RSS feeds, Web Services (Amazon, Flickr, Yahoo), etc.
•    The Zend Framework also includes several different database objects, making it extremely simple to query your database, without having to write any SQL.
•    Currently, it doesn't come with a full-blown ORM (Object-Record Mapper, usually an implementation of ActiveRecord.). We might see this feature in the future.

CakePHP

•    CakePHP is mostly an advanced MVC framework, with a few extra modules added on top.
•    It can handle most of the database stuff, and it includes support for Ajax and data validation.
•    It also has a unique user authentication module called 'Access Lists', which can be used to give different users access to different parts of your CakePHP website.

Symfony Project

•    Symfony Project is a very extensive framework, and it includes a full-blown ORM, called Propel, which is another open source project and probably one of the best ORM solutions for PHP.
•    It includes Creole for the database abstraction layer and Mojavi for the Model-View-Controller model layer.
•    Most of the tasks, like paging, are much more complicated in Symfony than in other frameworks, and simplicity definitely doesn't describe this framework.

Seagull Framework

•    The Seagull framework seems like a pretty good framework, and it comes with quite a lot of features.
•    Unfortunately, it doesn't come with any Ajax support. But it's likely that it will be added in the future.


WACT - Web Application Toolkit

•    WACT has the basic things a framework needs, like MVC, database objects and a template engine.
•    It doesn't have any extra modules, and it definitely lacks a few inbuilt things, like Ajax, caching, an authentication module and more.
•    WACT does have one of the best template engines though, and it even allows you to create your own template tags to add certain functionality.

Prado

•    Prado is a very unique framework, and it offers some really cool features. It doesn't come with inbuilt support for MVC, but it does have all kinds of components to handle most of the usual PHP tasks.
•    It takes event-driven scripts. For example, it's possible to set an onClick event on a HTML button that links to a PHP function. This closely resembles ASP.NET, and Prado contains more ASP.NET components, like a GridView and a Repeater Control.

PHP on Trax

•    This framework seems to be a PHP port of Ruby and Rails, and used to be called PHP on Rails.
•    Unfortunately documentation is quite sparse, so it's hard to determine what this framework offers, but its documentation does mention ActiveRecord, so it probably offers ActiveRecord, just like RoR.
•    Another thing it includes is inbuilt support for Ajax.
•    PHP on Trax is missing a few things, like an authentication module and a caching module. It doesn't have any extra modules either, so it's all a bit basic at the moment.

ZooP Framework

•    The ZooP Framework is really feature-packed, it supports almost anything, except for an ORM layer. .
•    Another thing ZooP offers is inbuilt GUI controls, making it very easy to create forms quickly. It supports most of the basic form elements, and that advantage of using GUI controls over regular HTML is that you can tightly integrate validation logic with the GUI controls.

eZ Components

•    ez Components isn't so much a framework, but more of a collection of components, and that's probably why it doesn't come with inbuilt support for MVC.

•    It comes with most of the usual components, like a database component and a caching component.
•    It doesn't have a ActiveRecord component or a authentication component.
•    It does have a few other extra components, like an e-mail component, but there aren't many, and other frameworks (like the Zend Framework) offer more.

CodeIgniter

•    CodeIgniter is a relatively new framework, by the makers of ExpressionEngine, and it looks quite promising.
•    Unfortunately, it doesn't handle multiple databases yet, although that is in the works.
•    It's inspired by Ruby on Rails, and it offers much of the same functionality, like scaffolding.
•    It has excellent documentation, and they've even got video tutorials to get you going.

Conclusion

Besides the features mentioned for each framework, all the above mentioned frameworks are compatible with PHP5. CakePHP, Seagull, WACT, ZOOP and CodeIgniter can be run on PHP4. Frameworks Prado and eZ Components do not support MVC. All the frameworks support Multiple databases and DB Objects besides Prado which doesn't support DB Objects. Caching is not supported by WACT and PHP on TRAX.

Each framework offers different functionality; choose the one according to your requirements.

No comments:

Post a Comment