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 89DFAB00A for ; Mon, 16 Jan 2012 21:58:25 +0000 (UTC) Received: (qmail 36447 invoked by uid 500); 16 Jan 2012 21:58:25 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 36425 invoked by uid 500); 16 Jan 2012 21:58:24 -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 36417 invoked by uid 99); 16 Jan 2012 21:58:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2012 21:58:24 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of centrepede@gmail.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bk0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2012 21:58:17 +0000 Received: by bkcjg15 with SMTP id jg15so4353304bkc.6 for ; Mon, 16 Jan 2012 13:57:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=jUIgfiMX8bviPMA3TeekjhTL0XKgBPzhzwx/UzEy3Ho=; b=uw8OCxJhe9KOiYy5W0Hiv2+wY/k/VOJkzJsTN3KM+2Uu2uLs6qrk+goE6YDXUPkbLn rsjuNP4t4pDcP3bjhknOqz4M2mssbpeCW7rocRvu/7S2d1VMGzbp3sneIkQhRWK2/Zms ICBW2EmLsp0yI6xTtoNixPmTXx4pDZy5+8gp8= MIME-Version: 1.0 Received: by 10.204.129.71 with SMTP id n7mr52986bks.91.1326751077376; Mon, 16 Jan 2012 13:57:57 -0800 (PST) Sender: centrepede@gmail.com Received: by 10.205.127.74 with HTTP; Mon, 16 Jan 2012 13:57:57 -0800 (PST) In-Reply-To: <16F98500875542318FF0C08C9CC497AA@gmail.com> References: <16F98500875542318FF0C08C9CC497AA@gmail.com> Date: Mon, 16 Jan 2012 21:57:57 +0000 X-Google-Sender-Auth: ONcSHAwxfQYV8nK64bhYA2G0ufY Message-ID: Subject: Re: Flex - lightweight event handling From: Aladin Scott To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=0015174783d8ac212f04b6ac4e22 X-Virus-Checked: Checked by ClamAV on apache.org --0015174783d8ac212f04b6ac4e22 Content-Type: text/plain; charset=ISO-8859-1 I second that, AS3 Signals is awesome. I haven't used native events to communicate outside of a parent class since using Signals. Aladin Scott On Mon, Jan 16, 2012 at 9:39 PM, Rick Winscot wrote: > With regard to Signals vs. Events... Rob provides a bridge called a > "NativeSignal." To Quote from his blog --- > > > Why not use EventDispatcher for the actual dispatching but wrap it in a > Signal facade? > > Presenting the NativeSignal class, which lets you have your cake and eat > it too. Take any EventDispatcher, e.g. Sprite. Create a NativeSignal that > targets an event of the dispatcher: > > // in a subclass: > click = new NativeSignal(this, 'click', MouseEvent); > // or decorating an instance: > click = new NativeSignal(theDispatcher, 'click', MouseEvent); > > Enjoy the Signal APIs and features. > > Dispatch from the NativeSignal or the EventDispatcher. Both use Flash's > native dispatchEvent(). If you're hesitant to put your trust in new > dispatching code, or you want to keep your EventDispatcher options open, > this is the gateway drug for you. You don't have to give up anything. All > the native functionality stays, and the ISignal interface can be piped in > like frosting, wherever you like. Doesn't that sound delicious? > > > What of Signal performance? > > http://alecmce.com/as3/events-and-signals-performance-tests > > The above charts are a little old - Rob has made a few commits since that > have added another 30 - 40% improvement. > > The primary takeaway is that Flash Events for UI interaction are ok ( a > necessary evil? ) but are a very poor choice for inter-application > communication. Efficiency in communication becomes more and more important > as the size of the application increases. > > -- > Rick Winscot > > > On Monday, January 16, 2012 at 4:17 PM, Omar Gonzalez wrote: > > > I'd definitely be interesting in exploring this idea. I had a lot of > > internal debating with myself over whether to use native Event objects or > > as3-signals when I wrote my MongoAS3 library. I ultimately chose signals > > because I enjoy their ease of use and payload type-checking runtime > errors. > > > > -omar > > --0015174783d8ac212f04b6ac4e22--