»
S
I
D
E
B
A
R
«
Sponsored Links


Adventure PHP Framework (APF) 1.11 released!
Jan 30th, 2010 by christian

press-logoThe APF team is proud to anounce the new website together with the 1.11 stable release.

Revision 1.11 comes up with a revised version of the form support on the basis of taglibs. Now generic definition of validators and filters on the basis of the observer pattern is supported and forms can be easier adjusted to own needs.

The OR mapper GenericORMapper, already added in the release 1.9, was extended with tools to automatically setup and update a database. Now the developer can completely concentrate on the development of the logic of the application since the storage of the objects is completely managed by the mapper.

Part of the release’s performance optimization were optimizations in the core of the frameworks and the rework of the integrated BenchmarkTimer. It now supplies the developer with a better graphical representation of the measurements to find hot spots within an application. Thus an application can be optimally prepared for operation.

With release of version 1.11 the support for PHP 4 has been announced for discontinuation and the compatibility with PHP 5.3 has been improved. The coming version 1.12 will focus on the extension of the new form support and the rework of the configuration component.

The new release files can be downloaded from http://adventure-php-framework.org/Page/008-Downloads.

Why APF (Adventure PHP Framework)?
Oct 24th, 2009 by christian

You think: “The APF is just another framework”, too? On this page you can find reasons why you should definitely use use the adventure php framework (APF)!

The APF supports you to rapidly create enterprise ready web applicatons or modules, that are fast, secure and reusable. The framework threrefore includes approved development tools to solve standard problems and implement pattern related applications.

Feature overview

The feature matrix gives you an overview of the features includes. It also compares the APF with other products.

Adventure PHP Framework - Feature-Matrix

The comparison indicators have the following meaning:

  • adventure php framework (APF) Completely supported / completely includes
  • adventure php framework (APF) Partially included
  • adventure php framework (APF) Not included / not supported
Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana
Oct 18th, 2009 by wood

When I was reading through my subscribed feeds I came across this post: Notes on Choosing a PHP Framework: A Comparison of CakePHP and the Zend Framework by Chad Kieffer.

Chad has done a great job comparing the two frameworks that he’s interested in. That inspired me to write something up for the frameworks that I prefer and use. :)

I began hunting for PHP frameworks ever since Ruby on Rails hit the street. Coincidentally one of the first PHP frameworks I played with was CakePHP. At that time CakePHP’s documentation was nearly non-existent so I had to seek for an alternative. I did a lot of searches, and researches, and finally I was happy to see CodeIgniter. Its user guide was what impressed me the most, I am sure many of the fellow CI users would agree with me on this one. Because of the excellent documentation, I was able to start working on projects right after I spent a few hours on the user guide! Developing apps on CI was such a breeze! Today, I develop web applications in CodeIgniter, Kohana and Zend Framework. If you want to find out how to use Zend Framework components with CI or Kohana, please read my previous blog entry: Using Zend Framework with CodeIgniter.

From version 1.2 when I first started coding on CI, to the newly released version 1.6.1 it sure is a long way. CodeIgniter has progressed well and gained many web developers’ trust, despite a few glitches. One of which was the spawn of the fork: Kohana.

CodeIgniter had some low periods where developers were all focused on pushing out new releases of ExpressionEngine, their commercial blogging/cms product. Some of the users on the CI forum got frustrated because their bug reports and feature requests were ignored. As a result of that, BlueFlame was born, and later renamed to Kohana.

Kohana is relatively unknown to the public. In fact, most of the Kohana users are ex-CI users or users that uses both CI and Kohana (like myself). According to the Kohana homepage and Wikipedia, the differences between Kohana and CodeIgniter are:

  1. Strict PHP5 OOP. Offers many benefits: visibility protection, automatic class loading, overloading, interfaces, abstracts, and singletons.
  2. Kohana has joined the GoPHP5 initiative. All releases from 2.2 on will conform with this project.
  3. Continues CodeIgniter design patterns. Anyone who has used CodeIgniter will quickly understand Kohana’s structure and design patterns.
  4. Community, not company, driven. Kohana is driven by community discussion, ideas, and code. Kohana developers are from all around the world, each with their own talents. This allows a rapid and flexible development cycle that can respond to bugs and requests within hours, instead of days or months.
  5. GET, POST, COOKIE, and SESSION arrays all work as expected. Kohana does not limit your access to global data, but offers the same filtering and XSS protection that CodeIgniter does.
  6. Cascading resources, modules, and inheritance. Controllers, models, libraries, helpers, and views can be loaded from any location within your system, application, or module paths. Configuration options are inherited and can by dynamically overwritten by each application.
  7. No namespace conflicts. Class suffixes, like _Controller, are used to prevent namespace conflicts. This allows a User’s controller and Users model to both be loaded at the same time.
  8. True auto-loading of classes. This includes libraries, controllers, models, and helpers. This is not pre-loading, but true dynamic loading of classes, as they are requested.
  9. Helpers are static classes, not functions. For example, instead of using form_open(), you would use form::open().
  10. Library drivers and API consistency. Libraries can use different “drivers” to handle different external APIs transparently. For example, multiple session storage options are available (database, cookie, and native), but the same interface is used for all of them. This allows new drivers to be developed for existing libraries, which keeps the API consistent and transparent.
  11. Powerful event handler. Kohana events can by dynamically added to, replaced, or even removed completely. This allows many changes to Kohana execution process, without modification to existing system code.

As you can see, whilst maintaining a certain level of similarity to CodeIgniter, Kohana does offer some advantages (at the same time, some disadvantages). Let’s take a look at a few quick comparisons. Grading scale: Limited < Fair < Good < Excellent. Please note: if a feature is not available in the distributed package, but is available via 3rd party libraries, I will state that in the comparison. If a feature is available both in the distributed package and via 3rd party libraries, only the official one will get assessed.

Feature Comparison of CodeIgniter and Kohana
Feature CodeIgniter 1.6.1 Kohana 2.1.1 Notes
License Apache/BSD-style new BSD Licenses are similar, although Kohana uses the new BSD license which is slightly more flexible than CI’s modified BSD license.
PHP compatibility 4.3.2+ and 5 5.1.3+ CodeIgniter supports PHP4 whilst Kohana is a stict PHP5 framework. If you are using PHP5 then Kohana offers more OOP and performance advantages. Start from version 2.2 (yet to be released), Kohana will only support PHP 5.2+.
Supported Databases MySQL (4.1+)
MySQLi
MS SQL
PostgreSQL
SQLite
Oracle
ODBC
MySQL
PostgreSQL
SQLite
CodeIgniter’s longer history ensures us a more widely available database support options than Kohana, although in the future Kohana is likely to support more databases too.
Community Forum
Wiki
Bug Tracker
Forum
Trac
IRC
CodeIgniter obviously has a much larger community and offers a wiki for community members to share tutorials and code snippets. Kohana on the other hand, has a smaller community, however the developers are actively online on the forum and IRC.
Documentation / User Guide Excellent Limited CodeIgniter is known for its excellent user guide. Kohana is in the process of improving its documentation.
Tutorial / Sample Availability Good Fair Tutorials are available on both of their forums. CodeIgniter has the advantage of having a wiki for easier navigation. Kohana on the other hand, has a dedicated tutorial page for some of the tutorials.
MVC Strict Strict Both frameworks use the same MVC approach.
Modular / HMVC Via 3rd party libraries Built in Kohana is built with HMVC in mind whilst CodeIgniter has some 3rd party libraries such as Matchbox and Modular HMVC to accomplish the same effect.
Conventions Flexible Flexible Unlike CakePHP, both of the frameworks offer flexible convensions. There are some defaults but most of them can be overwritten.
Configuration PHP files PHP files In my opinion Kohana is more configurable than CodeIgniter yet it is simpler (less clustered) to do so! Most of the Kohana configuration files are stored in the system folder, you only copy and paste the ones you actually need to modify, and modify them accordingly. CodeIgniter’s config files are all stored in the application folder.
Database Abstraction Modified ActiveRecord Modified ActiveRecord
ORM (optional)
Both frameworks use the modified ActiveRecord pattern. Kohana has an optional ORM module. CodeIgniter has some ORM and Rails-style ActiveRecord implementation avaliable via 3rd party libraries.
ACL Via 3rd party libraries Auth library (optional) Neither of the frameworks forces you to use a specific ACL mechanism. CodeIgniter does not have one built in, and Kohana has one available as an optional module.
Validation Good Good Both frameworks offer a good built in validtion layer. Kohana 2.2 is planned to have some significant improvements for the validation library.
Caching Limited Fair In my opinion both of the caching features are limited. Kohana offers a slightly more useful cache library that supports file, SQLite, APC, eAccelerator, memcache, and Xcache based caching, with tag support.
Session Good Excellent CodeIgniter 1.6 has improved its session library, but it’s still inferior to Kohana’s implementation. Kohana’s session library supports both encryption and storing session data in database.
Logging / Debugging Good Excellent Both frameworks offer very good logging and debugging mechanisms. Kohana is a little bit ahead thanks to PHP5’s native Exception class and its powerful event handlers.
Templating Native PHP Native PHP Templating is *very* easy for both frameworks. If you can skin Wordpress, then you’d have no problems at all skinning CI or Kohana. If you want though, you can still incorporate one of the 3rd party templating solutions such as Smarty.
Helpers Good Good Helpers are usually libraries that used for simple, repetitive tasks. Both frameworks offer a wide range of helpers for handling forms, URLs and dates, etc.
JavaScript / AJAX N/A N/A Both frameworks respect your choice of JavaScript / AJAX frameworks. Unlike CakePHP and Ruby on Rails, they don’t have built-in helpers for any of the JavaScript libraries. This offers more flexibility as well as the use of unobtrusive JavaScript.
Web Services Fair Fair I could be wrong but I don’t think either framework supports (or at least encourages) RESTful design…
Localization Limited Good CodeIgniter has limited i18n support whilst Kohana offers a bit more (timezone / full UTF8 layer, etc).
Unit Testing Limited None * CodeIgniter’s built in unit testing class is very limited. * Kohana as of version 2.1.1 does not have a unit testing class, however it is planned for version 2.2.

The Verdict

I had a hard time deciding which of these two I use. In the end, I chose to use both. Why? Because they each have its advantages and disadvantages.

CodeIgniter is great for small to medium sized projects, especially good for legacy servers which have PHP4 installed. The fantastic user guide made coding in CI very efficient.

Kohana is probably better for larger sized projects as well as projects that need more flexible extensions. PHP5 offers better (proper) OOP support as the foundation, plus Kohana’s several better feature implementation make it a strong competitor to its predecessor.

There is no right or wrong for which framework you use, everyone has its own taste. For me, CodeIgniter’s excellent documentation and Kohana’s strict PHP5 + easy to use are the primary reasons to choose them over say, CakePHP and Symfony. That said, CakePHP, Symfony and other frameworks are all excellent choices depending on your taste and experience. On one hand I envy the Ruby community because they obviously have the de facto framework to work with, on another hand, we have more options hey? :)

Feel free to share your opinion and experiences!

Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter
Oct 18th, 2009 by wood

It was over a year ago that I wrote the article that compares CodeIgniter and Kohana. Since then both CodeIgniter and Kohana have seen major progress with the release of CodeIgniter 1.7.0 and Kohana 2.3.

In December 2008, a new PHP framework called Yii has been released to the public with a stable 1.0. There were a lot of new PHP framework released in 2008, but Yii was one of the more recognised ones because:

Before I start this round of comparison, let me briefly list my experience with these frameworks, so you may interpret this article with your own judgement.

CodeIgniter: I started using CodeIgniter since its version 1.2.x from a few years ago. During the past few years I have worked on projects mainly using version 1.5.x and 1.6.x. I have now stopped using CodeIgniter in favour of using other PHP 5 only frameworks.

Kohana: I first started using Kohana when it was called BlueFlame back when it was first forked out of CodeIgniter. Since then I have lurked and participated in the Kohana community. All of my recent projects are done in Kohana.

Yii: The 1.0 release of Yii had my attention, but I didn’t really dive into it until about now. However, most of my impressions on Yii are based on its documentation and this article by Daniel.

Let’s see how they compare with each other.

Same notes as before: Grading scale: Limited < Fair < Good < Excellent. If a feature is not available in the distributed package, but is available via 3rd party libraries, I will state that in the comparison. If a feature is available both in the distributed package and via 3rd party libraries, only the official one will get assessed.

Software releases used for this comparison are:

CodeIgniter 1.7.1
Kohana 2.3.1
Yii 1.0.3

Licensing

CodeIgniter Good

CI uses a modified, generally regarded as more restrict, BSD/Apache-style license.

Kohana Excellent

Kohana uses a new BSD license.

Yii Excellent

Yii uses a new BSD license.

PHP Compatibility

CodeIgniter

PHP >= 4.3.2 (including all versions of PHP 5)

At first glance, it seems that CI has the edge because it supports both PHP 4 and PHP 5. However, if you are familiar with OOP then you would know that a lot of compromises had to be made in order to offer PHP 4 support. This is one of the primary reasons some developers including myself avoid to use CodeIgniter.

Even if you decided to use CodeIgniter, I still strongly recommend you build your application using PHP 5 and proper OOP techniques.

Kohana

PHP >= 5.2.3

Yii

PHP >= 5.1.0

Supported Databases

CodeIgniter Excellent

  • MySQL
  • MySQLi
  • PostgreSQL
  • MSSQL
  • Oracle
  • SQLite
  • ODBC

Kohana Good

  • MySQL
  • MySQLi
  • PostgreSQL
  • MSSQL
  • PDOSqlite

*Note: Kohana devs have decided long ago NOT to use PDO. Kohana 3.0 is planned to offer support for PDO.

Yii Excellent

All the DBMS supported by PDO (PHP Data Object).

* Note: Support for Active Record is limited by DBMS. Currently, only the following DBMS are supported:

  • MySQL 4.1 or later
  • PostgreSQL 7.3 or later
  • SQLite 2 and 3

Community

CodeIgniter Excellent

CodeIgniter is blessed with a strong, active community that is friendly and helpful. CodeIgniter offers a forum, a bug tracker and a wiki.

Kohana Good

Kohana has a small but elite community. It offers a forum, Trac and IRC.

Yii Good

Yii is the youngest of the three, therefore has the smallest community, it is however growing rapidly as the framework itself gains more attention. Yii offers a forum, a project hosted at Google Code and a documentation section that supports user comments.

Documentation / User Guide

CodeIgniter Excellent

CodeIgniter is known for its excellent documentation. Its user guide is comprehensive, easy to follow and up-to-date. Every release of the framework contains a copy of the user guide too, in case you are maintaining more than one version of CodeIgniter applications.

Kohana Good

Kohana’s documentation has been improved since my last article. It now has coverage for most aspect of the framework. However, some parts of the documentation are out of date and sometimes incorrect.

I’ve been using Kohana for a long time now and I found the documentation sufficient and very helpful. It may not have the fine layout found in CodeIgniter’s user guide, but it certainly helps me track down features and usages.

Yii Fair

The documentation of Yii seems to be fairly well constructed even though I haven’t started using Yii. All new features or changed features are carefully documented so you know what is going on with the specific version of Yii you use. The API documentation is also very useful thanks to the fully documented code base. However, many features at this stage are not documented in the guide, you need to go through the API or the code base itself.

Tutorial / Sample Availability

CodeIgniter Good

CodeIgniter has a dedicated wiki page for all the tutorials, and you can dig around their forums to find more.

Kohana Good

Kohana has a dedicated page for tutorials, but is out-of-date. It also hosts a learning centre which unfortunately has not been updated since September 2008. You can still head over to their forums to find useful tutorials though.

Yii Good

Yii has a cookbook section that contains a selection of tutorials. As always, check their forums to find more.

MVC

All three frameworks use the MVC (Model-View-Controller) architecture.

CodeIgniter Yes

Apart from the standard MVC architecture, CodeIgniter also offers libraries, plugins, helpers and hooks.

Kohana Yes

Apart from the standard MVC architecture, Kohana also offers modules, events, libraries, helpers and hooks.

Yii Yes

Apart from the standard MVC architecture, Yii also offers components, modules, extensions, view widgets and helpers *.

* Helpers are undocumented but are referenced in the guide and in the API. All of the helpers can be found in the utils folder under the main framework directory.

Modularity

CodeIgniter via 3rd party libraries

CodeIgniter does not support modules out-of-box, but you may use 3rd party libraries such as HMVC or Matchbox to achieve similar effect.

Kohana Excellent

Kohana not only offers modules, but also has cascading file system which takes modularity to a higher level.

Yii Good

Yii 1.0.3 has added support for modules.

Conventions

Unlike CakePHP, all three frameworks offer flexible conventions. There are some defaults but most of them can be overwritten or configured.

Configuration

CodeIgniter Good

CodeIgniter has a fairly good configuration system.

Kohana Excellent

Kohana has an exceptionally well configuration system.

Quoted from the guide: The file structure of config files follows Kohana’s file structure. Meaning that configuration files in the application directory take precedence over those in modules which take precedence over those in the system directory. The one exception is config.php which is hardcoded into the application/config directory and cannot be moved elsewhere.

Yii Good

Yii has a fairly good configuration system.

Database Abstraction and ORM

Definitions: Database Abstraction, ORM

CodeIgniter Good

CodeIgniter has a very powerful database class. It offers query builders as well as database manipulation classes, however it has no built-in ORM support.

One important thing that needs clarification is that even though CodeIgniter has Active Record, it is NOT the same Active Record pattern people commonly refer to. CodeIgniter’s Active Record is merely a collection of query builders.

For ORM, please check out IgnitedRecord and DataMapper. Interestingly enough, despite their naming, IgnitedRecord uses the Data Mapper pattern and DataMapper uses the Active Record pattern.

Kohana Good

The most notable time saver during my project development has to be the ORM. Kohana offers a lightweight but useful ORM implementation. It’s not as sophisticated as the Rails Active Record module, but it does the job quite well. I especially love the ease of updating many-to-many records.

Yii Good

Yii has a more complex syntax for declaring model relationships than Kohana. However, it also offers more powerful features such as named scope, albeit the syntax is nowhere near as clean as Ruby on Rails’.

Auth and ACL

CodeIgniter via 3rd party libraries

CodeIgniter has a couple of 3rd party Auth and ACL libraries, please head over to their forums to find more.

Kohana Good

Kohana has a built-in Auth module and a number of 3rd party Auth and ACL libraries including my Authlite.

* A more complete Auth + ACL solution is being cooked for the 2.4 release. Check out Samsoir’s replies in this thread.

Yii Excellent

Yii has built-in support for both authentication and authorisation. As I have no first hand experience with Yii yet, I can only judge this feature from the documentation, by the look of it it’s fairly easy to use and flexible enough for most systems.

Validation

CodeIgniter Excellent

CodeIgniter’s form validation library.

Kohana Excellent

Kohana’s validation library.

Yii Excellent

Yii’s validation usage. All of the system validators can be found in the validators directory under the main framework directory.

Caching

CodeIgniter Limited

CodeIgniter only supports basic file system based page caching.

Kohana Good

Kohana offers a slightly more useful cache library that supports file, SQLite, APC, eAccelerator, memcache, and XCache based caching, with tag support.

Yii Good

Similar to Kohana’s implementation, Yii supports memcache, APC, XCache and DB based (default to SQLite) page and segment caching.

Session

CodeIgniter Good

CodeIgniter’s session class is fairly good, it supports database storing as well as handling flash data.

Kohana Good

Similarly to CodeIgniter, Kohana also offers a very good session library.

Yii Excellent

Yii provides a much more powerful and flexible session class. Unfortunately session at this stage is undocumented in the guide. Flash data is not part of the session classes but part of the Auth package.

Logging / Debugging

CodeIgniter Good

CodeIgniter has a basic error handling class and a profiler class.

Kohana Excellent

Kohana has a good logging class as well as a more flexible profiler.

Yii Excellent

Yii has a logging/profiling class that is just as powerful and flexible as Kohana’s.

Templating

All three frameworks encourage the use of native PHP for templating.

CodeIgniter alternative syntax available

CodeIgniter also provides an alternative template parser class.

Kohana alternative syntax available via 3rd party libraries

Kohana has no built-in alternative template syntax support. However, you can find some 3rd party ones such as Temper.

Yii alternative syntax available

Yii also provides an alternative template syntax borrowed from Prado.

Helpers

Helpers are usually libraries that used for simple, repetitive tasks.

CodeIgniter Excellent

CodeIgniter offers 21 built-in helpers.

Kohana Excellent

Kohana offers 19 built-in helpers.

Yii Limited

Yii offers 6 built-in helpers.

Bundled JavaScript Library

Bundling JavaScript does NOT mean you have to use the bundled JavaScript. In fact, I encourage the use of unobtrusive JavaScript than using the bundled classes.

CodeIgniter None

CodeIgniter has no bundled JavaScript library.

Kohana None

Kohana has no bundled JavaScript library.

Yii jQuery

Yii has jQuery bundled, and it provides a number of useful classes such as auto-complete.

Web Services

I recommend integrating Zend Framework for web service uses.

CodeIgniter Limited

CodeIgniter has an XML-RPC class.

Kohana None

Kohana has no built-in support for any web services.

Yii Limited

Yii has SOAP support.

Internationalisation

CodeIgniter Limited

CodeIgniter provides a basic language class.

Kohana Fair

Kohana provides basic locale and language support.

Yii Good

Yii provides a more complete i18n class.

Unit Testing

I recommend using SimpleTest or PHPUnit for your unit test needs.

CodeIgniter Limited

CodeIgniter has a very basic unit testing class.

Kohana None

Kohana has no built-in unit testing support in the distributed release version (v2.3.1). However, a unit test module can be found in SVN trunk.

Yii None

Yii has no built-in unit testing support.

The Verdict

Verdict from round 1: There is no right or wrong in which framework you use, everyone has his own taste. For me, CodeIgniter’s excellent documentation and Kohana’s strict PHP5 + easy to use are the primary reasons to choose them over say, CakePHP and Symfony. That said, CakePHP, Symfony and other frameworks are all excellent choices depending on your taste and experience. On one hand I envy the Ruby community because they obviously have the de facto framework to work with, on another hand, we have more options hey? :)

At this stage I can’t comment on Yii, but I am very tempted to developing at least one project using it. So far I am reasonably impressed by the features it offers. :)

Do you have anything to say about the frameworks? Found mistakes in the article? Start the discussion in the comments! :)

from beyondcoding

Notes on Choosing a PHP Framework: A Comparison of CakePHP and the Zend Framework
Oct 18th, 2009 by wood

posted February 15th, 2008 at 4:05 pm by chad

Are you considering using a PHP framework for your next project? If so, this article's for you. I've narrowed down my choices to CakePHP and the Zend Framework and have documented my findings here.

Four or five years ago I began researching PHP application frameworks. At the time, the pickings were very slim, especially when compared to those available to Java developers. On the advice of an ex-Coldfusion developer, I settled on the PHP port of Fusebox, the de facto Coldfusion framework. Fusebox 3 provided a convenient set of loose conventions for structuring applications, organizing code, naming files, and controlling flow. It served my development team well and applications we built with it are still up and running.

I took a two-year "break" from development and upon my return I found more PHP frameworks than you can shake a stick at. Now I need to find a solid MVC-based framework and after reading dozens of articles and completing a few tutorials, I've narrowed my focus to CakePHP and the Zend Framework.

Before going further, let it be known that my point of view is that of someone with plenty of application development experience but without a formal IT or CS degree. I can't go on about the merits of one design pattern vs. another. I do, however, understand the need for convention, the advantages of modularity, and the efficiency of easily repeatable processes.

Please note that symfony, Prado, Code Ignitor, and many of the other PHP frameworks all look quite capable of meeting most project needs. If you're a fanboy of another framework, please don't espouse it's merits here. I am, however, interested in hearing about your general experience in learning a framework, particularly in the context of your professional background.

Here's a comparison and a few conclusions after spending a bit of time with both CakePHP and the Zend Framework. Please note that my quality scale range is: poor, fair, good, excellent.

Feature Comparison of CakePHP and the Zend Framework
Feature
CakePHP Zend Framework Notes
License
MIT
BSD
Each of these licenses is fairly flexible. Carefully consider how your application will be used and distributed. It's also important to consider compatability with 3rd-party extensions included in your application.
Compatability
4 and 5
5.1.4 or later
I'm curious to know what CakePHP's PHP 4 support plans are. I would wager that Zend's focus on PHP 5 provides it with performance advantages.
Documentation
CakePHP's documentation is good but Zend's API documentation is more thorough.
Community
Both frameworks have active user communities. In addition to official channels, there are also several 3rd-party community sites easily found through Google. CakePHP has done an excellent job of marketing their framework considering that they don't have the corporate backing that ZF has.
Tutorial/Sample Availability
excellent
fair
CakePHP's Bakery provides an extensive collection of user-submitted applications and code samples. The IBM developerWorks CakePHP tutorials and aritcles are excellent. The Zend tutorials I've reviewed are good but require a siginifcant amount of MVC design experience. The ZF beginner's videos, however, are very helpful. CakePHP provides screencasts too.
MVC
strict
optional
These points are the biggest distinctions between these frameworks and probably the most important factors when choosing one over the other. CakePHP has very strict naming and code organization conventions while Zend only enforces conventions when employing its MVC capabilities.
Conventions
strict
flexible
Configuration
PHP file
PHP Array, XML, or
INI files
This difference doesn't seem like a sticking point to me. If you're a fan of build tools like ANT, you might prefer Zend's choice of XML.
Database Abstraction
PHP, PEAR, ADODB
I may be wrong, but I get the impression that PDO is gaining favor in the PHP community.
Security
Both frameworks take security very seriously and provide authentication and ACL-based authorization. Both approach ACLs in a similar fashion and both provide a high degree of flexibility in creating and applying ACLs.
Data
Handling
good
excellent
Out of the box, both frameworks provide data validation and sanitization mechanisms. Zend provides more validation options, but CakePHP's validation is easily extended via PCRE. CakePHP provides a single data sanitization mechanism where Zend provides various filters to run data through.
Caching
good
excellent
Both provide file-based caching of pages. Zend supports several cache backends, including APC, SqlLite, and of course, the Zend Platform.
Sessions
excellent
excellent
Both provide robust session handling.
Logging/
Debugging
good
excellent
Both provide application logging. IMHO, the Zend_Debug class gives ZF the edge in this category.
Templating
PHP-based
PHP-based
Coming from a UI design background, templating is of particular interest to me. If you've developed templates for WordPress or Drupal, you'll feel right at home with CakePHP. The Zend Framework requires a bit more work to get templating up and running (see Zend_View and Zend_Layout). It's possible to integrate 3rd party templating engines, like Smarty, with each framework.
Helpers
good
excellent

Both frameworks provide basic helpers to handle AJAX, forms, and time conversions. CakePHP provides a nice HTML helper which is absent in ZF but ZF provides a wider range of helper classes.

JavaScript/Ajax
good
fair
CakePHP comes with built-in support for Prototype and script.aculo.us while the current stable release of the ZF doesn't support any specific JavaScript framework. ZF does provide JSON support and the 1.5 release adds AJAX form featues. I'd like to see both provide a wider range of support for 3rd party JavaScript Frameworks, particularly Jquery and YUI.
Web Services
good
excellent

Both provide support for REST and XML-RPC as well as basic XML feed parsing. Zend Framework also provides support for several popular web services including OpenID, Reflection, Akismet, Amazon, Audioscrobbler, Delicious, Flickr, Simpy, StrikeIron, Technorati, and Yahoo.

Localization
good
excellent
Both support localization through stadard means (i18n, l10n). CakePHP is adding/improving support in their upcoming 1.2 release. Zend appears to have better support for localization and translation.
Unit Testing
yes
yes
Both frameworks provide support for this feature that far too many of us avoid ;) I have yet to evaluate unit testing support.

Conclusions and Recommendations

I hope to use both of these frameworks soon, but in the short term I'll most likely base an upcoming CMS project on CakePHP. I do plan on using the Zend Framework, if for nothing other than expanding my application design skills, PHP 5 OO knowledge, and understanding of MVC.

CakePHP: Hit the Ground Running Fast

If you are new to MVC, require PHP 4 support, want stricter conventions, or want powerful code generation tools, CakePHP is the choice for you. CakePHP's Scaffolding, Bake, and ACL scripts provide definite advantages when the need to quickly build an application arise.

The Zend Framework: A Model of Flexibility

If you know MVC, need more control over application design, or want built-in support for popular Web services, the Zend Framework is choice for you. The Zend Framework provides a greater degree of flexibility in designing applications that scale effectively in high-performance environments.

The bottom line is that both frameworks are rapidly evolving in response to user demands. Gaps in each are being filled and there seems to be no lack of demand for developers with skills in each framework.

Feel free to share your experience in learning any framework.



»  Substance: PHP Frameworks   »  SiteMap