you have the option of importing them when you need and keeping generall
required (heavily used comps in the controllers)

*App::import*('*Component*'.$name)

same goes for models etc

at least thats as I understand.

2008/4/27 mixersoft <[EMAIL PROTECTED]>:

>
> I am really wrestling with this one and wanted to know if others have
> established a best practice.
>
> My controllers are getting to be pretty big, and different actions may
> need different components. Also, in the name of DRY, I have a
> 'services'  controller that performs a lot of standard utility
> functions -- which may need differnt components depending on who
> called it. (i.e. Flickr component for Flickr stuff, Facebook component
> for FB, Google component for Google, etc.)
>
> It really seems like Cake wants me to include all compoments in the
> controller var $compoments class attribute, so they can all be easily
> referenced as a class variable.  But I'm looking at my 'services'
> controller, and that could very well have a lot of very large
> components.
>
> I've tried to use App::import('Compoment', component) to load
> components on the fly, but when I do so I can't seem to access any
> components which those components need to use. (see post on Component
> Polymorphism).
>
> What do people do? Is the extra overhead so nominal that I should just
> include everything plus the kitchen sink? Is Cake smart enough only to
> actually load a component when it is actually required?  Has anyone
> else figured out how to properly load components on the fly?
>
> TIA.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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