>From a performance perspective, using fewer listeners in favor of instance references will always be a performance gain since listeners take up way more system resources than object references do. From an architecture/design pattern perspective though, I can't say whether it's better or not, it depends more on the type of app you are building and the type of architecture you put in place to support it. Not having as many events (either bubbling or non-bubbling) in favor of instances (i.e. SingletonClass.getInstance()) can get very messy and buggy if you don't do it right. I've found using a mix of both in the right places to be the best methodology in terms of overall design.
Jason Merrill Bank of America Enterprise Technology & Global Risk L&LD Instructional Technology & Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal Innovative Learning Blog & subscribe. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of S0 F1 Sent: Wednesday, September 03, 2008 9:17 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Singleton lookups vs Events ... Any thoughts on whether it's more efficient (in terms of development and player performance) to use Singleton's (with static public 'getInstance' or such) instead of Event's when developing mid-sized applications? (for classes that *are* Singleton's of course). Asking this in regards to when you know no other class needs notification. It seems a lot cleaner in terms of code (not having to create and listen for events). Just a direct call - but what about performance speed, etc. Is this good practice. Cheers. _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders