@Jonathan, I agree your code is simpler and more cake like, and in that sense I guess, it is better.
However, there are some tradeoffs. In particular: 1. No abstract class So you will not be informed at parse time whether one of your subclassed function implementations is missing. You will have to detect it yourself at runtime, as the parent function will happily run without saying anything. 2. Two object instantiations instead of one Both the parent and child are instantiated. So, all things being equal, performance might be better with the approach of using a static function getInstance(). 3. Requires the implementation to be chosen at startup. You must know at copmonent startup time, which you need. This is not always possible. Sometimes, the action needs to do some things before it is able to make that decision. Nevertheless, I can see situations where either approach fits better. YMMV. Thanks for responding. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
