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. On Apr 9, 5:08 pm, "R. Rajesh Jeba Anbiah" <[EMAIL PROTECTED]> wrote: > (The topic not related to the current > threadhttp://groups.google.com/group/cake-php/browse_frm/thread/0133dc7f2df... > ; it's different) > > I'm interested to know the preferred way of organizing the models and > vendor files, for the project say "meta search engine - using > webservices of the search engines": > My idea as of now: > 1. class SearchEngine extends AppModel{ > > // <some common grabber codes> > > } > > 2. class Google extends SearchEngine{ > function search(){ > } > > } > > 3. class Yahoo extends SearchEngine{ > function search(){ > } > > } > > 4. nusoap in vendor folders > > 5. Written grabber codes in models folder > > Question: > 1. Is it the correct approach? > > 2. I think, it's better that if we can call methods like > $this->Controller->SearchEngine->Google->search(); > > but with current architecture, it's possible only this: > $this->Controller->Google->search(); > > 3. Is it ok to place *our* grabber codings in models folder? > > 4. Is it right to say that only the 3rd party scripts to be placed in > vendors folder? > > 5. Should the sub-model files (Google, Yahoo) to be placed inside a > folder? > > -- > <?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 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 -~----------~----~----~----~------~----~------~--~---