You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Peter Ent <pe...@adobe.com> on 2013/12/06 17:42:09 UTC

Cross-compiling to build components

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

Re: [FlexJS] FW: Cross-compiling to build components

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Yes, as I understand it, it does. So it would really be inverse of
what we're doing. We're stubbing the JS to 'fit' AS. Frank suggests we
stub AS to 'fit' the HTML/DOM etc. In his approach the only language
anyone - component and application developers alike - would have to
write in would be AS.

But as we use Closure on the JS side, we have all the advantages he
mentions (packages, classes, interfaces) but one, the IDE support for
writing the JS components. For application developers, there is no
discussion anyway, AS is the language of choice and there will be
plenty of IDE support for FlexJS. So I don't really see a plus in
completely changing our approach, and I'm afraid that 'stubbing' AS
might be a tad more involved than is suggested by it's casual mention
;-)

EdB





On Mon, Dec 16, 2013 at 6:57 PM, Alex Harui <ah...@adobe.com> wrote:
> Interesting.  But that would require a SWC that stubs the browser APIs?
>
> On 12/16/13 6:27 AM, "Frank Wienberg" <fr...@jangaroo.net> wrote:
>
>>Hi Alex,
>>
>>sorry for the late response.
>>I didn't mean to use the same code base for the SWF and the HTML
>>components, but only the same programming language: ActionScript!
>>Of course you would still have to learn different low-level APIs
>>(DisplayList versus browser DOM/BOM), but at least you could use the same
>>language and the higher level constructs from AS3 like packages, classes,
>>interfaces and the superior IDE support that exists for ActionScript.
>>
>>
>>On Tue, Dec 10, 2013 at 7:10 PM, Alex Harui <ah...@adobe.com> wrote:
>>
>>> The implementation of some low-level components will be vastly different
>>> for SWF than for JS.  I'm not clear how you could generate the JS from
>>>the
>>> AS version.
>>>
>>> -Alex
>>>
>>> On 12/10/13 12:13 AM, "Frank Wienberg" <fr...@jangaroo.net> wrote:
>>>
>>> >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?)
>>> >
>>>
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FlexJS] FW: Cross-compiling to build components

Posted by Alex Harui <ah...@adobe.com>.
Interesting.  But that would require a SWC that stubs the browser APIs?

On 12/16/13 6:27 AM, "Frank Wienberg" <fr...@jangaroo.net> wrote:

>Hi Alex,
>
>sorry for the late response.
>I didn't mean to use the same code base for the SWF and the HTML
>components, but only the same programming language: ActionScript!
>Of course you would still have to learn different low-level APIs
>(DisplayList versus browser DOM/BOM), but at least you could use the same
>language and the higher level constructs from AS3 like packages, classes,
>interfaces and the superior IDE support that exists for ActionScript.
>
>
>On Tue, Dec 10, 2013 at 7:10 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> The implementation of some low-level components will be vastly different
>> for SWF than for JS.  I'm not clear how you could generate the JS from
>>the
>> AS version.
>>
>> -Alex
>>
>> On 12/10/13 12:13 AM, "Frank Wienberg" <fr...@jangaroo.net> wrote:
>>
>> >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?)
>> >
>>


Re: [FlexJS] FW: Cross-compiling to build components

Posted by Frank Wienberg <fr...@jangaroo.net>.
Hi Alex,

sorry for the late response.
I didn't mean to use the same code base for the SWF and the HTML
components, but only the same programming language: ActionScript!
Of course you would still have to learn different low-level APIs
(DisplayList versus browser DOM/BOM), but at least you could use the same
language and the higher level constructs from AS3 like packages, classes,
interfaces and the superior IDE support that exists for ActionScript.


On Tue, Dec 10, 2013 at 7:10 PM, Alex Harui <ah...@adobe.com> wrote:

> The implementation of some low-level components will be vastly different
> for SWF than for JS.  I'm not clear how you could generate the JS from the
> AS version.
>
> -Alex
>
> On 12/10/13 12:13 AM, "Frank Wienberg" <fr...@jangaroo.net> wrote:
>
> >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?)
> >
>

Re: [FlexJS] FW: Cross-compiling to build components

Posted by Alex Harui <ah...@adobe.com>.
The implementation of some low-level components will be vastly different
for SWF than for JS.  I'm not clear how you could generate the JS from the
AS version.

-Alex

On 12/10/13 12:13 AM, "Frank Wienberg" <fr...@jangaroo.net> wrote:

>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 <pe...@adobe.com> 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" <pe...@adobe.com> wrote:
>>
>> >I will update the wiki.
>> >Thanks.
>> >--peter
>> >
>> >On 12/6/13 1:08 PM, "OmPrakash Muppirala" <bi...@gmail.com> 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" <er...@ixsoftware.nl> 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
>><co...@gmail.com>
>> >>> wrote:
>> >>> > Very nice job!
>> >>> >
>> >>> >
>> >>> > 2013/12/6 Mr. Rich <mr...@gmail.com>
>> >>> >
>> >>> >> Great news Peter,
>> >>> >> On Dec 6, 2013 11:42 AM, "Peter Ent" <pe...@adobe.com> 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
>> >>>
>> >
>>
>>


Re: [FlexJS] FW: Cross-compiling to build components

Posted by Frank Wienberg <fr...@jangaroo.net>.
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 <pe...@adobe.com> 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" <pe...@adobe.com> wrote:
>
> >I will update the wiki.
> >Thanks.
> >--peter
> >
> >On 12/6/13 1:08 PM, "OmPrakash Muppirala" <bi...@gmail.com> 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" <er...@ixsoftware.nl> 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 <co...@gmail.com>
> >>> wrote:
> >>> > Very nice job!
> >>> >
> >>> >
> >>> > 2013/12/6 Mr. Rich <mr...@gmail.com>
> >>> >
> >>> >> Great news Peter,
> >>> >> On Dec 6, 2013 11:42 AM, "Peter Ent" <pe...@adobe.com> 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
> >>>
> >
>
>

[FlexJS] FW: Cross-compiling to build components

Posted by Peter Ent <pe...@adobe.com>.
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" <pe...@adobe.com> wrote:

>I will update the wiki.
>Thanks.
>--peter
>
>On 12/6/13 1:08 PM, "OmPrakash Muppirala" <bi...@gmail.com> 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" <er...@ixsoftware.nl> 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 <co...@gmail.com>
>>> wrote:
>>> > Very nice job!
>>> >
>>> >
>>> > 2013/12/6 Mr. Rich <mr...@gmail.com>
>>> >
>>> >> Great news Peter,
>>> >> On Dec 6, 2013 11:42 AM, "Peter Ent" <pe...@adobe.com> 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
>>>
>


Re: Cross-compiling to build components

Posted by Peter Ent <pe...@adobe.com>.
I will update the wiki.
Thanks.
--peter

On 12/6/13 1:08 PM, "OmPrakash Muppirala" <bi...@gmail.com> 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" <er...@ixsoftware.nl> 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 <co...@gmail.com>
>> wrote:
>> > Very nice job!
>> >
>> >
>> > 2013/12/6 Mr. Rich <mr...@gmail.com>
>> >
>> >> Great news Peter,
>> >> On Dec 6, 2013 11:42 AM, "Peter Ent" <pe...@adobe.com> 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
>>


Re: Cross-compiling to build components

Posted by OmPrakash Muppirala <bi...@gmail.com>.
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" <er...@ixsoftware.nl> 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 <co...@gmail.com>
> wrote:
> > Very nice job!
> >
> >
> > 2013/12/6 Mr. Rich <mr...@gmail.com>
> >
> >> Great news Peter,
> >> On Dec 6, 2013 11:42 AM, "Peter Ent" <pe...@adobe.com> 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
>

Re: Cross-compiling to build components

Posted by Erik de Bruin <er...@ixsoftware.nl>.
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 <co...@gmail.com> wrote:
> Very nice job!
>
>
> 2013/12/6 Mr. Rich <mr...@gmail.com>
>
>> Great news Peter,
>> On Dec 6, 2013 11:42 AM, "Peter Ent" <pe...@adobe.com> 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

Re: Cross-compiling to build components

Posted by Cosma Colanicchia <co...@gmail.com>.
Very nice job!


2013/12/6 Mr. Rich <mr...@gmail.com>

> Great news Peter,
> On Dec 6, 2013 11:42 AM, "Peter Ent" <pe...@adobe.com> 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
> >
>

Re: Cross-compiling to build components

Posted by "Mr. Rich" <mr...@gmail.com>.
Great news Peter,
On Dec 6, 2013 11:42 AM, "Peter Ent" <pe...@adobe.com> 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
>