My main reason for choosing components rather than models is the
inheritance of them. Cake isn't really set up to handle inheriting
models directly. Creating a component which then returned a reference
to the correct model would be my preference, but without actually
sitting down and coding something up, I could be wrong.

Stephen

On Apr 15, 3:47 pm, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> Stephen Orr wrote:
> > I can't answer all your points, but in theory, you could probably
> > achieve what you're aiming for in (2) by making SearchEngine a factory
> > class which instantiates the other classes on demand. But you'd
> > probably do better with a different architecture.
>
> > My suggestion would be to use a call such as $this->SearchEngine-
> > >search('google', 'keywords');
>
> > Oh, and I'd be more inclined to make SearchEngine a component than a
> > model. Just a difference in opinion, but I think it'd make for simpler
> > usage.
>
>     Thanks for your comments; I strongly believe that the logic should
> be a part of model. Do you have any good reason for choosing
> components?
>
> --
>   <?php echo 'Just another PHP saint'; ?>
> Email: rrjanbiah-at-Y!com    Blog:http://rajeshanbiah.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
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