More information about the Underscore mailing list

[_] Zend Vs Cake

Jon Bennett jmbennett at gmail.com
Fri Jul 11 17:55:14 BST 2008

Hi nicolas,

>> Cake Php wanted to be the Rails implentation of PHP. The problem with Cake
>> is that they want to be compatible with PHP4 and PHP5 so the object
>> structure is not really good ( as my english :D )

this comes up pretty often on the google group, either from
Symfony/CodeIgniter peeps or coming from Java. What's usually said is
that php4's arrays are super powerful, and are equally so in php5 - so
data between models/controllers are done with arrays not objects,
other than that - everything (afaik!) that should be an object is.
it's certainly something I can live with! An example of this is a java
guy wanted to do:

toy = new Toy();
toy.size = 'value';
toy.price = 'value';
toy.weight = 'value';
toy.save();

which in cake you'd do:

$toy = new Toy();
$toy->set(array(
  'size' => 'value',
  'price' => 'value',
  'weight' => 'value',
);
$toy->save();

not really all that different, and quite a small price to pay for
php4/5 compatibility imo.

cheers,

jon

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett