Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE0D19F76 for ; Wed, 8 Feb 2012 06:50:38 +0000 (UTC) Received: (qmail 49364 invoked by uid 500); 8 Feb 2012 06:50:38 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 49209 invoked by uid 500); 8 Feb 2012 06:50:36 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 49200 invoked by uid 99); 8 Feb 2012 06:50:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 06:50:33 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [80.237.132.80] (HELO wp073.webpack.hosteurope.de) (80.237.132.80) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 06:50:24 +0000 Received: from p4aa831.osaknt01.ap.so-net.ne.jp ([120.74.168.49] helo=[192.168.1.21]); authenticated by wp073.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1Rv1Lv-0002RU-Vp; Wed, 08 Feb 2012 07:50:04 +0100 Message-ID: <4F321B14.3060700@leichtgewicht.at> Date: Wed, 08 Feb 2012 15:49:56 +0900 From: Martin Heidegger User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: flex-dev@incubator.apache.org Subject: Re: [RT] From Singletons to Unit-testable code References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;mh@leichtgewicht.at;1328683824;9372119c; X-Virus-Checked: Checked by ClamAV on apache.org 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.