Besides, what is *so* bad about arrays? I know Dieter didn't mean that, but
some people consider arrays in PHP to be sort of the worst thing you can
do... What about them? 

The same way string manipulation is what Perl is known for, one of the
reasons PHP is so great is how flexible its arrays are, so why shouldn't we
take advantage of that?

I mean I'm all forward for CakePHP 2.x idea of "objectizing" the models
(since also AFAIK 2.0 or 3.0, can't remember which one, will bring PHP 5
exclusivity, so it kinda makes more sense), but until then arrays are the
way to go! And thank Cake for that!

Regarding Symfony's way of defining queries, it makes me believe that they
were designed by someone who liked the way some Java APIs look, and tried to
bring it to PHP... While in PHP there's no need for that. For example, this:

// Some tasty Cake

$result = $this->Model->findAll(array( 'Model.name' => 'name' ), null,
'Model.created');

Looks *FAR* better than:

// Some ear-infecting symfony

$c = new Criteria();
$c->add(ModelPeer::NAME, 'name);
$c->addAscendingOrderByColumn(ModelPeer::CREATED);
$result = ModelPeer::doSelect($c);

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de jonathan.snook
Enviado el: Sábado, 03 de Marzo de 2007 04:15 p.m.
Para: Cake PHP
Asunto: Re: CakePHP versus Symfony ?

Well, depends on what you consider better. As nate's example points
out, Propel is extremely verbose, especially for handling conditionals
(aka: criteria). I prefer Cake's approach. The difference between the
use of arrays and objects isn't huge, imho. I prefer arrays as it
allows me to easily inject additional properties at runtime if need
be.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to