incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Heidegger ...@leichtgewicht.at>
Subject Re: [RT] From Singletons to Unit-testable code
Date Wed, 08 Feb 2012 06:49:56 GMT

On 08/02/2012 15:31, Alex Harui wrote:
> You can have a back-door to replace singletons if you want to.  That's even
> easier to add to Singleton. For now though, keep in mind that because of
> the stew of dependencies between classes in the framework, you really need
> to restart the app or implement a reset protocol, otherwise something might
> break when you replace a singleton after startup.
Of course replacing the singleton could break a running system. Once its 
all instances then a singleton can't break anything. But more 
importantly: I don't suggest that this "context-replacement" is used 
permanently. Its a refactoring strategy to get to a tested system 
without breaking code.

> folks trying to modify the framework as is, or folks who will help
> me with my re-write.

Uhm, how can folks help you?

yours
Martin.

Mime
View raw message