Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B36F410F32 for ; Tue, 10 Dec 2013 08:14:11 +0000 (UTC) Received: (qmail 98293 invoked by uid 500); 10 Dec 2013 08:14:10 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 98269 invoked by uid 500); 10 Dec 2013 08:14:10 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 98261 invoked by uid 99); 10 Dec 2013 08:14:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Dec 2013 08:14:10 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FRT_ADOBE2,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.216.179] (HELO mail-qc0-f179.google.com) (209.85.216.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Dec 2013 08:14:03 +0000 Received: by mail-qc0-f179.google.com with SMTP id i8so3601578qcq.24 for ; Tue, 10 Dec 2013 00:13:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=gbP/Ytk45nVINoqG3WJ814FqIibxWEh/weWuuHHiYXg=; b=hl3ELCXLpT7v06N1fzqJMqBcbztNnPWTMa3xxn0/HwMty/sAcWmkSwikL4sSdCP9ZB QW/dCjaJt7L2L3O2ktqtZ6w53USxD+QXmIc0Yxye5bYZxUFJOZObqQr36pwDQiUdqDrM wnAmARoR0dWaGs0YRnku3/N5+2jaCIqA5rC+Cw5lLTe2pvAurutUB8WyQktFVC1zAVA9 0zjFL7Bm6H/l5MbBazj9Zo8oRdcRD3kQBZPZD3zCBudykYzUeGXC70Q7En202dMIgUhE Q8gSM8f1CCu1A65Laga8DeCVxgrMJJmNtWpRZ2D73TxhoLNfNHaWtPLswdqt4CMz6rXg O/kQ== X-Gm-Message-State: ALoCoQl3xH/fjors3qiSWwCSs/yRAudZibzoNUQQbMmx8v7CV5Vw07RgNRLt3CE6A0w1tavdFnJ5 MIME-Version: 1.0 X-Received: by 10.49.131.69 with SMTP id ok5mr167997546qeb.77.1386663222596; Tue, 10 Dec 2013 00:13:42 -0800 (PST) Received: by 10.96.44.202 with HTTP; Tue, 10 Dec 2013 00:13:42 -0800 (PST) In-Reply-To: References: Date: Tue, 10 Dec 2013 09:13:42 +0100 Message-ID: Subject: Re: [FlexJS] FW: Cross-compiling to build components From: Frank Wienberg To: dev@flex.apache.org Content-Type: multipart/alternative; boundary=047d7bdc0b96ce66c904ed29b0ee X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc0b96ce66c904ed29b0ee Content-Type: text/plain; charset=ISO-8859-1 Hi, great to hear of this new approach! I never understood why you guys implement Flex components for HTML5 in JS, not in ActionScript. Once you have AS3 API "stubs" of the browser APIs (DOM, BOM, remember my suggestions about a [Native] annotation some time ago?), you would not be limited to building compound components like this, but you could implement *any* component in AS3, in other words, port your JS code to AS3! Or is there any show stopper for that with the FalconJx compiler that I am not aware of? (Maybe the missing [Native] support?) On Fri, Dec 6, 2013 at 8:46 PM, Peter Ent wrote: > Hi, > > I've extended the Wiki page for creating components on the FlexJS Wiki > pages. I've also placed the sample code I used, called "DataGridXcompile", > in the FlexJS examples directory. > > Peter Ent > Adobe Systems > > On 12/6/13 1:14 PM, "Peter Ent" wrote: > > >I will update the wiki. > >Thanks. > >--peter > > > >On 12/6/13 1:08 PM, "OmPrakash Muppirala" wrote: > > > >>This is fantastic news, Peter! > >> > >>If you can add a page in the wiki describing the process of converting a > >>simple AS3 component into JS, that would be so much helpful for folks > >>like > >>me, who want to help with building components for FlexJS. > >> > >>Thanks, > >>Om > >>On Dec 6, 2013 9:39 AM, "Erik de Bruin" wrote: > >> > >>> Way to go, Peter! > >>> > >>> Let me know if there is a way to optimise the process. There is a lot > >>> we can do with FalconJx and maybe the framework architecture that will > >>> allow us to do more with this paradigm... > >>> > >>> EdB > >>> > >>> > >>> > >>> > >>> On Fri, Dec 6, 2013 at 6:31 PM, Cosma Colanicchia > >>> wrote: > >>> > Very nice job! > >>> > > >>> > > >>> > 2013/12/6 Mr. Rich > >>> > > >>> >> Great news Peter, > >>> >> On Dec 6, 2013 11:42 AM, "Peter Ent" wrote: > >>> >> > >>> >> > Hi, > >>> >> > > >>> >> > I've just finished an experiment with pretty good results. > >>> >> > > >>> >> > A little while ago I created a first pass at a FlexJS DataGrid. > >>>This > >>> >> meant > >>> >> > building both the ActionScript and the JavaScript components and > >>>all > >>> of > >>> >> > their parts (data model, view, and so forth). Creating a new > >>>component > >>> >> for > >>> >> > FlexJS follows the same pattern: build the component in one > >>>language > >>> and > >>> >> > then build it in the other. > >>> >> > > >>> >> > The experiment was to take the ActionScript component and compile > >>>it > >>> into > >>> >> > JavaScript and compare the result with my hand-crafted JavaScript > >>> >> version. > >>> >> > Well, the result was a success. Doing this uncovered some issues > >>>with > >>> the > >>> >> > FalconJX compiler that were resolved by either Alex Harui or Erik > >>>de > >>> >> Bruin, > >>> >> > which I think, strengthened the compiler. Once things were ironed > >>>out, > >>> >> the > >>> >> > ActionScript DataGrid compiled cleanly into JavaScript and ran. > >>> >> > > >>> >> > This experiment worked for the DataGrid because it is really a > >>> composite > >>> >> > component. That is, the DataGrid I created is a Container with a > >>> >> ButtonBar > >>> >> > for column headers and Lists for the columns; the DataGrid > >>> co-ordinates > >>> >> the > >>> >> > events between all of the lists. This technique would not work for > >>> >> > components that have very custom JavaScript requirements or which > >>>have > >>> >> > "native" JavaScript/HTML versions (such a Label or a Button). > >>> >> > > >>> >> > What this experiment means is that some components - specifically > >>>ones > >>> >> > that are composed of existing components - can be created and > >>>tested > >>> in > >>> >> > ActionScript, then cross-compiled into JavaScript to provide a > >>> fast-path > >>> >> to > >>> >> > the JavaScript version. This technique may not work 100% in all > >>>cases, > >>> >> but > >>> >> > what it has shown me is that you can get a lot of good code on the > >>> >> > JavaScript side from the ActionScript source, at least enough to > >>> quickly > >>> >> > finish the JavaScript version. > >>> >> > > >>> >> > Regards, > >>> >> > Peter Ent > >>> >> > Adobe Systems > >>> >> > > >>> >> > >>> > >>> > >>> > >>> -- > >>> Ix Multimedia Software > >>> > >>> Jan Luykenstraat 27 > >>> 3521 VB Utrecht > >>> > >>> T. 06-51952295 > >>> I. www.ixsoftware.nl > >>> > > > > --047d7bdc0b96ce66c904ed29b0ee--