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 397859CF3 for ; Sun, 12 Feb 2012 20:12:15 +0000 (UTC) Received: (qmail 50357 invoked by uid 500); 12 Feb 2012 20:12:14 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 50281 invoked by uid 500); 12 Feb 2012 20:12:14 -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 50273 invoked by uid 99); 12 Feb 2012 20:12:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2012 20:12:14 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.167.159.180] (HELO mail.digitalprimates.net) (66.167.159.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2012 20:12:06 +0000 Received: from DPSBS1.digitalprimates.local ([fe80::5823:d1b4:86c2:3ad0]) by DPSBS1.digitalprimates.local ([fe80::5823:d1b4:86c2:3ad0%22]) with mapi id 14.01.0289.001; Sun, 12 Feb 2012 14:13:34 -0600 From: "Michael A. Labriola" To: "flex-dev@incubator.apache.org" Subject: RE: Starting with the Whiteboard Code Thread-Topic: Starting with the Whiteboard Code Thread-Index: AQHM46gD0bOmdzfBZ06thj2tHUNCLJYt7ysAgAAB2YCAALl3gIAAIRYAgAAigoCAAQYMgP//404wgACvMYCAAAnbgIAAHpiAgAAEsAD//+N/QIAAhK8AgAifBbA= Date: Sun, 12 Feb 2012 20:13:33 +0000 Message-ID: References: <4F30337E.9020803@leichtgewicht.at> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [24.12.91.54] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 >>If I'm not wrong, you did some deep experiments in DI and AOP, what can y= ou say about performences ? did you do measurements ? if yes, how ? Because of the VM limitations, the type of AOP I was most interested in was= compile time. I was working on something like an AspectJ implementation. S= ome of the first features were things like compile-time mixins and interfac= e implementation mapping, so that you can indicate an object needs to imple= ment an interface, provide a mapping to a mixin and have the compiler mix t= hose classes together .=20 This meant that we can still have small and a relatively decoupled programm= ing model, and yet let as avoid some of the costs that Alex was referring t= o. Effectively, at compile time, there are no extra function closures, func= tion calls or delegations for the VM to deal with.=20 My experiments with DI are very subjective. I was willing to pay the extra = cost for instantiating an object as required to do DI. I very much care abo= ut testing objects and replacing their implementations. My feelings on this= are pretty simple, yes, this introduces overhead, but it makes so many thi= ngs faster to develop, maintain, test and extend than before that I am will= ing to take a performance degradation in some areas. However, this also mea= ns I don't have to take everything.=20 Meaning that, if this is done properly, I could decide not to inject a heav= y weight style manager. I could inject different implementations of some ke= y features that are lighter-weight or perhaps no implementation at all. I c= ould let people develop different binding implementations which work differ= ently for different requirements. That flexibility, in my mind, means the F= lex framework becomes a pay-as-you-go model. If you need all of the feature= s in a large enterprise app, you can have them. However, I do not have to h= ave all of the heaviest implementations in a mobile application. To me, the net result would be a reduction in size and an increase in speed= .=20 My thoughts, Mike -----Message d'origine----- From: Michael A. Labriola Sent: Tuesday, February 07, 2012 1:35 AM To: flex-dev@incubator.apache.org Subject: RE: Starting with the Whiteboard Code >> Writing unit tests for the framework is something that could be=20 >>started now. The framework code is out there. >>Are the other ones logical tests? In other words: Would they need to=20 >>be ported to a unit-test system? Unfortunately, with a few exceptions, unit tests *cannot* be written for th= e Flex framework. It isn't something that can be started. Unit tests by def= inition involve the writing of a test for a single object isolated from all= other objects, not dependent upon global state, that also means they can't= be dependent upon things like the frame rate and enter frame events. Looking at something like UIComponent, it references singletons and static = classes (global state). It is coupled tightly with dozens of other objects.= =20 It relies upon the LayoutManager, which relies upon the frames, to function= . There is nothing about the current state of Flex that approaches being test= able in units. That's why so many of us have been arguing for refactoring f= or so long. Since most of our code involves extending or referencing Flex c= lasses, and in most cases there aren't interfaces for those implementations= , our code becomes un-unit-testable by association. Mike Notice: This transmission is intended only for the use of the individual or= entity to which it is addressed and may contain information that is privil= eged or confidential. Any dissemination, distribution or copying of this tr= ansmission by anyone other than the intended recipient is strictly prohibit= ed. If you have received this transmission in error, please notify the send= er immediately by e-mail or telephone and delete the original transmission.= Thank you.=20