You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Jason Taylor <ja...@dedoose.com> on 2016/07/15 01:14:59 UTC

FlexJS and Dart?

Hey guys, for various reasons I'm leaning towards picking Dart over actionscript for future projects, mostly because the dart language is advanced supporting async/await, generics, abstracts, and much more.   However I think the team behind MXML, especially in FlexJS and the layout framework are second to none.   I was contemplating bringing in FlexJS to dart via StageXL (http://www.stagexl.org/) an implmentation of the core flash runtine in Dart, along with a custom version of FlexJS that I would cross compile to Dart.    Has anyone considered this path, and what are you're thoughts about this?   Personally I don't like some of the decisions made in the FlexJS project regarding supporting flash runtimes as well as JS as it adds a lot of crud to the FlexJS codebase and ties our hands limiting us specifically to the flash runtime and avoiding some of the more multi-threaded oriented javascript developments.     Just want to gather some opinions before me and my team start tearing into this.   Some changes I would make to the FlexJS framework will include using something like signals instead of string events, heavily using multiple threads for layout & rendering.   
~ JT


RE: FlexJS and Dart?

Posted by Jason Taylor <ja...@dedoose.com>.
I had considered Haxe at one point, but I feel Haxe suffers from some of the same issues I'm talking about, namely the haxe language has been stagnant for a long time as well, and while others have added  features into via extensions the result isn't very elegant at all - https://github.com/stroncium/hx-async,  considering my main starting point for all of this will be heavy use of asyncronous programming I don't think Haxe would be the best language to use.  Right now the only 2 that seem relevant are TypeScript and Dart, but imho Dart is far and away an better designed language.  

-----Original Message-----
From: Greg Dove [mailto:greg.dove@gmail.com] 
Sent: Friday, July 15, 2016 2:22 PM
To: dev@flex.apache.org
Subject: Re: FlexJS and Dart?

Out of curiosity, Jason, did you also consider Haxe? I would have thought that was more appealing - it certainly also has many of the language features you mention and more, along with the flash api support (via
openfl) for html5. That is my main alternative to FlexJS for the migration paths I am reviewing for my client at the moment, but our goal is to continue with AIR mobile builds and html5 browser builds from the same codebase, so that is a major constraint in the options available.



On Sat, Jul 16, 2016 at 8:53 AM, Jason Taylor <ja...@dedoose.com> wrote:

> bleh, mean cross compiling the FlexJS framwork to Dart, and switching 
> from actionscript to dart is trivial.
>
> -----Original Message-----
> From: Jason Taylor [mailto:jason@dedoose.com]
> Sent: Friday, July 15, 2016 1:52 PM
> To: dev@flex.apache.org
> Subject: RE: FlexJS and Dart?
>
> again I'm refering to cross compiling the dart framework itself to 
> dart, aka the source input will be dart and not actionscript, and will 
> skip the FalconJX compiler completely and go straight to dart2js or 
> dartVM.  The dart VM provides all the compile time and runtime 
> checking you could ask for.  Canvas is widely supported these days and ridiculously more
> performant than dom+css as it uses the GPU where available.     Switching
> from actionscript to javascript is trivial as the language is almost 
> identical, except that dart supports more features than actionscript.
>  I'm not talking about using Dart as an output target from FalconJX as 
> that dosen't get us away from actionscript.
>
> -----Original Message-----
> From: Alex Harui [mailto:aharui@adobe.com]
> Sent: Friday, July 15, 2016 1:46 PM
> To: dev@flex.apache.org
> Subject: Re: FlexJS and Dart?
>
> Not so much to convince you otherwise, but in case others are curious 
> why certain decision where made:
>
> ActionScript is our source language.  So is MXML.  If it isn't, IMO, 
> then it isn't Flex.  We own the compilers and can make changes to the 
> language, even changes that won't run in a SWF if we don't care about running a SWF.
>
> Our current cross-compiled output is JS with some dependencies on the 
> Google Closure Library and then sent through the Google Closure 
> Compiler for optimization, so we are using Google's resource quite a bit.
>
> The cross-compiler could probably be taught to output Dart or TypeScript.
> It was designed to have replaceable outputs.
>
> The Basic component set leverages the DOM, but other component sets 
> can and will leverage Canvas.
>
> I chose to start with the DOM because at the time, some folks were 
> still on IE8/9.  Also, the DOM seemed to have more established 
> accessibility support.  I haven't kept up to know if there are good 
> accessibility implementations for Canvas yet.
>
> Anyway, good luck with your move to Dart.
>
> -Alex
>
> On 7/15/16, 12:58 PM, "Jason Taylor" <ja...@dedoose.com> wrote:
>
> >I guess my main issue is actionscript itself.  The language hasn't 
> >progressed much in quite some time, support for asynchronous 
> >operations in just not designed into the language, lamdas, expression trees, etc
> >etc, it's on it's way to a dead langage.      Our teams have put in an
> >increadible ammount of work on FalconJX to support actionscript, and 
> >google has put in an increadible ammount of work on running Dart in JS as
> >well as the DartVM.   I however am coming to the conclusion that they
> >aren't mutally exclusive in that in some early tests recompiling the
> >FlexJS framework to Dart  appears to be possible outright.   As far as
> >component sets and targets, that's a separate debate from FlexJS on 
> >dart, and while yes using a component set that mimics the flash 
> >display list might incur a performance hit, we are talking about 
> >hitting the Canvas/WebGL where performance is vastly superior than targeting the DOM.
> >    I think FlexJS is great, I don't think Actionscript is great, and 
> >I think we could be much better off letting the google team handle 
> >building the compiler tools, VM, and let us focus on our framework in 
> >the best language out there.  Just my $.02, either way it's my pet 
> >project now, so I'll see how far I can take this.
> >~ JT
> >
> >-----Original Message-----
> >From: Alex Harui [mailto:aharui@adobe.com]
> >Sent: Thursday, July 14, 2016 10:28 PM
> >To: dev@flex.apache.org
> >Subject: Re: FlexJS and Dart?
> >
> >Hi Jason,
> >
> >FlexJS isn't one framework/component set.  It is being designed to 
> >support a multitude of component sets.  The initial "Basic" component 
> >set that we have been working on is designed to have minimum overhead 
> >in its JS output.  In the Basic set, we specifically do not want to 
> >emulate Flash in the browser because that will likely add another 
> >layer of overhead.  There is an experiment underway for a component 
> >set that does emulate Flash and it will be a bigger effort and bigger code.
> >
> >In the APIs for the Basic set, I tried to keep some Flex concepts and 
> >APIs, but I don't think I tied the APIs to Flash.  Can you give me an 
> >example of the "crud" you are talking about?  I think we can support 
> >workers some day.  I still believe that it will be to your advantage 
> >to be able to test your code with a "runtime verifier" which is why 
> >the Basic set compiles to both SWF and JS.  Most JS tools want you to 
> >have all of your code in one place.  Large apps are often built in a 
> >truly modular fashion where code isn't or can't be gathered in one place.
> >
> >You can even use FlexJS/FalconJX compiler without the Basic component 
> >set and just write ActionScript against native JS APIs or third-party 
> >libraries.
> >
> >Or you can grow your own component set that is more tuned to what you 
> >want.  It can have signals, or whatever you want.  It doesn't have to 
> >run as a SWF.  All we are providing is MXML and AS compilation and 
> >some default SWCs, but our SWCs don't have to be the SWCs you use.
> >
> >In theory, you could even get the cross-compiler to spit out Dart 
> >instead of JS, but I haven't spent any time figuring out how hard 
> >what
> would be.
> >Somebody could probably teach the compiler to handle generics and 
> >other language improvements that can be output as additional code and 
> >don't need runtime changes in the SWF and certainly for cross-compiled output.
> >
> >That's the cool part of Apache projects.  No corporation controlling 
> >things. You can do pretty much whatever you want.
> >
> >Thanks,
> >-Alex
> >
> >On 7/14/16, 6:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:
> >
> >>Hey guys, for various reasons I'm leaning towards picking Dart over 
> >>actionscript for future projects, mostly because the dart language 
> >>is advanced supporting async/await, generics, abstracts, and much more.
> >>However I think the team behind MXML, especially in FlexJS and the layout
> >>framework are second to none.   I was contemplating bringing in FlexJS to
> >>dart via StageXL (http://www.stagexl.org/) an implmentation of the 
> >>core flash runtine in Dart, along with a custom version of FlexJS 
> >>that I
> would
> >>cross compile to Dart.    Has anyone considered this path, and what are
> >>you're thoughts about this?   Personally I don't like some of the
> >>decisions made in the FlexJS project regarding supporting flash 
> >>runtimes as well as JS as it adds a lot of crud to the FlexJS 
> >>codebase and ties our hands limiting us specifically to the flash 
> >>runtime and avoiding some
> >>of the more multi-threaded oriented javascript developments.     Just
> >>want to gather some opinions before me and my team start tearing into
> >>this.   Some changes I would make to the FlexJS framework will include
> >>using something like signals instead of string events, heavily using 
> >>multiple threads for layout & rendering.
> >>~ JT
> >>
> >
>
>

Re: FlexJS and Dart?

Posted by Greg Dove <gr...@gmail.com>.
Out of curiosity, Jason, did you also consider Haxe? I would have thought
that was more appealing - it certainly also has many of the language
features you mention and more, along with the flash api support (via
openfl) for html5. That is my main alternative to FlexJS for the migration
paths I am reviewing for my client at the moment, but our goal is to
continue with AIR mobile builds and html5 browser builds from the same
codebase, so that is a major constraint in the options available.



On Sat, Jul 16, 2016 at 8:53 AM, Jason Taylor <ja...@dedoose.com> wrote:

> bleh, mean cross compiling the FlexJS framwork to Dart, and switching from
> actionscript to dart is trivial.
>
> -----Original Message-----
> From: Jason Taylor [mailto:jason@dedoose.com]
> Sent: Friday, July 15, 2016 1:52 PM
> To: dev@flex.apache.org
> Subject: RE: FlexJS and Dart?
>
> again I'm refering to cross compiling the dart framework itself to dart,
> aka the source input will be dart and not actionscript, and will skip the
> FalconJX compiler completely and go straight to dart2js or dartVM.  The
> dart VM provides all the compile time and runtime checking you could ask
> for.  Canvas is widely supported these days and ridiculously more
> performant than dom+css as it uses the GPU where available.     Switching
> from actionscript to javascript is trivial as the language is almost
> identical, except that dart supports more features than actionscript.
>  I'm not talking about using Dart as an output target from FalconJX as that
> dosen't get us away from actionscript.
>
> -----Original Message-----
> From: Alex Harui [mailto:aharui@adobe.com]
> Sent: Friday, July 15, 2016 1:46 PM
> To: dev@flex.apache.org
> Subject: Re: FlexJS and Dart?
>
> Not so much to convince you otherwise, but in case others are curious why
> certain decision where made:
>
> ActionScript is our source language.  So is MXML.  If it isn't, IMO, then
> it isn't Flex.  We own the compilers and can make changes to the language,
> even changes that won't run in a SWF if we don't care about running a SWF.
>
> Our current cross-compiled output is JS with some dependencies on the
> Google Closure Library and then sent through the Google Closure Compiler
> for optimization, so we are using Google's resource quite a bit.
>
> The cross-compiler could probably be taught to output Dart or TypeScript.
> It was designed to have replaceable outputs.
>
> The Basic component set leverages the DOM, but other component sets can
> and will leverage Canvas.
>
> I chose to start with the DOM because at the time, some folks were still
> on IE8/9.  Also, the DOM seemed to have more established accessibility
> support.  I haven't kept up to know if there are good accessibility
> implementations for Canvas yet.
>
> Anyway, good luck with your move to Dart.
>
> -Alex
>
> On 7/15/16, 12:58 PM, "Jason Taylor" <ja...@dedoose.com> wrote:
>
> >I guess my main issue is actionscript itself.  The language hasn't
> >progressed much in quite some time, support for asynchronous operations
> >in just not designed into the language, lamdas, expression trees, etc
> >etc, it's on it's way to a dead langage.      Our teams have put in an
> >increadible ammount of work on FalconJX to support actionscript, and
> >google has put in an increadible ammount of work on running Dart in JS as
> >well as the DartVM.   I however am coming to the conclusion that they
> >aren't mutally exclusive in that in some early tests recompiling the
> >FlexJS framework to Dart  appears to be possible outright.   As far as
> >component sets and targets, that's a separate debate from FlexJS on
> >dart, and while yes using a component set that mimics the flash display
> >list might incur a performance hit, we are talking about hitting the
> >Canvas/WebGL where performance is vastly superior than targeting the DOM.
> >    I think FlexJS is great, I don't think Actionscript is great, and I
> >think we could be much better off letting the google team handle
> >building the compiler tools, VM, and let us focus on our framework in
> >the best language out there.  Just my $.02, either way it's my pet
> >project now, so I'll see how far I can take this.
> >~ JT
> >
> >-----Original Message-----
> >From: Alex Harui [mailto:aharui@adobe.com]
> >Sent: Thursday, July 14, 2016 10:28 PM
> >To: dev@flex.apache.org
> >Subject: Re: FlexJS and Dart?
> >
> >Hi Jason,
> >
> >FlexJS isn't one framework/component set.  It is being designed to
> >support a multitude of component sets.  The initial "Basic" component
> >set that we have been working on is designed to have minimum overhead
> >in its JS output.  In the Basic set, we specifically do not want to
> >emulate Flash in the browser because that will likely add another layer
> >of overhead.  There is an experiment underway for a component set that
> >does emulate Flash and it will be a bigger effort and bigger code.
> >
> >In the APIs for the Basic set, I tried to keep some Flex concepts and
> >APIs, but I don't think I tied the APIs to Flash.  Can you give me an
> >example of the "crud" you are talking about?  I think we can support
> >workers some day.  I still believe that it will be to your advantage to
> >be able to test your code with a "runtime verifier" which is why the
> >Basic set compiles to both SWF and JS.  Most JS tools want you to have
> >all of your code in one place.  Large apps are often built in a truly
> >modular fashion where code isn't or can't be gathered in one place.
> >
> >You can even use FlexJS/FalconJX compiler without the Basic component
> >set and just write ActionScript against native JS APIs or third-party
> >libraries.
> >
> >Or you can grow your own component set that is more tuned to what you
> >want.  It can have signals, or whatever you want.  It doesn't have to
> >run as a SWF.  All we are providing is MXML and AS compilation and some
> >default SWCs, but our SWCs don't have to be the SWCs you use.
> >
> >In theory, you could even get the cross-compiler to spit out Dart
> >instead of JS, but I haven't spent any time figuring out how hard what
> would be.
> >Somebody could probably teach the compiler to handle generics and other
> >language improvements that can be output as additional code and don't
> >need runtime changes in the SWF and certainly for cross-compiled output.
> >
> >That's the cool part of Apache projects.  No corporation controlling
> >things. You can do pretty much whatever you want.
> >
> >Thanks,
> >-Alex
> >
> >On 7/14/16, 6:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:
> >
> >>Hey guys, for various reasons I'm leaning towards picking Dart over
> >>actionscript for future projects, mostly because the dart language is
> >>advanced supporting async/await, generics, abstracts, and much more.
> >>However I think the team behind MXML, especially in FlexJS and the layout
> >>framework are second to none.   I was contemplating bringing in FlexJS to
> >>dart via StageXL (http://www.stagexl.org/) an implmentation of the
> >>core flash runtine in Dart, along with a custom version of FlexJS that I
> would
> >>cross compile to Dart.    Has anyone considered this path, and what are
> >>you're thoughts about this?   Personally I don't like some of the
> >>decisions made in the FlexJS project regarding supporting flash
> >>runtimes as well as JS as it adds a lot of crud to the FlexJS codebase
> >>and ties our hands limiting us specifically to the flash runtime and
> >>avoiding some
> >>of the more multi-threaded oriented javascript developments.     Just
> >>want to gather some opinions before me and my team start tearing into
> >>this.   Some changes I would make to the FlexJS framework will include
> >>using something like signals instead of string events, heavily using
> >>multiple threads for layout & rendering.
> >>~ JT
> >>
> >
>
>

RE: FlexJS and Dart?

Posted by Jason Taylor <ja...@dedoose.com>.
bleh, mean cross compiling the FlexJS framwork to Dart, and switching from actionscript to dart is trivial.

-----Original Message-----
From: Jason Taylor [mailto:jason@dedoose.com] 
Sent: Friday, July 15, 2016 1:52 PM
To: dev@flex.apache.org
Subject: RE: FlexJS and Dart?

again I'm refering to cross compiling the dart framework itself to dart, aka the source input will be dart and not actionscript, and will skip the FalconJX compiler completely and go straight to dart2js or dartVM.  The dart VM provides all the compile time and runtime checking you could ask for.  Canvas is widely supported these days and ridiculously more performant than dom+css as it uses the GPU where available.     Switching from actionscript to javascript is trivial as the language is almost identical, except that dart supports more features than actionscript.     I'm not talking about using Dart as an output target from FalconJX as that dosen't get us away from actionscript.  

-----Original Message-----
From: Alex Harui [mailto:aharui@adobe.com]
Sent: Friday, July 15, 2016 1:46 PM
To: dev@flex.apache.org
Subject: Re: FlexJS and Dart?

Not so much to convince you otherwise, but in case others are curious why certain decision where made:

ActionScript is our source language.  So is MXML.  If it isn't, IMO, then it isn't Flex.  We own the compilers and can make changes to the language, even changes that won't run in a SWF if we don't care about running a SWF.

Our current cross-compiled output is JS with some dependencies on the Google Closure Library and then sent through the Google Closure Compiler for optimization, so we are using Google's resource quite a bit.

The cross-compiler could probably be taught to output Dart or TypeScript.
It was designed to have replaceable outputs.

The Basic component set leverages the DOM, but other component sets can and will leverage Canvas.

I chose to start with the DOM because at the time, some folks were still on IE8/9.  Also, the DOM seemed to have more established accessibility support.  I haven't kept up to know if there are good accessibility implementations for Canvas yet.

Anyway, good luck with your move to Dart.

-Alex

On 7/15/16, 12:58 PM, "Jason Taylor" <ja...@dedoose.com> wrote:

>I guess my main issue is actionscript itself.  The language hasn't 
>progressed much in quite some time, support for asynchronous operations 
>in just not designed into the language, lamdas, expression trees, etc
>etc, it's on it's way to a dead langage.      Our teams have put in an
>increadible ammount of work on FalconJX to support actionscript, and 
>google has put in an increadible ammount of work on running Dart in JS as
>well as the DartVM.   I however am coming to the conclusion that they
>aren't mutally exclusive in that in some early tests recompiling the
>FlexJS framework to Dart  appears to be possible outright.   As far as
>component sets and targets, that's a separate debate from FlexJS on 
>dart, and while yes using a component set that mimics the flash display 
>list might incur a performance hit, we are talking about hitting the 
>Canvas/WebGL where performance is vastly superior than targeting the DOM.
>    I think FlexJS is great, I don't think Actionscript is great, and I 
>think we could be much better off letting the google team handle 
>building the compiler tools, VM, and let us focus on our framework in 
>the best language out there.  Just my $.02, either way it's my pet 
>project now, so I'll see how far I can take this.
>~ JT
>
>-----Original Message-----
>From: Alex Harui [mailto:aharui@adobe.com]
>Sent: Thursday, July 14, 2016 10:28 PM
>To: dev@flex.apache.org
>Subject: Re: FlexJS and Dart?
>
>Hi Jason,
>
>FlexJS isn't one framework/component set.  It is being designed to 
>support a multitude of component sets.  The initial "Basic" component 
>set that we have been working on is designed to have minimum overhead 
>in its JS output.  In the Basic set, we specifically do not want to 
>emulate Flash in the browser because that will likely add another layer 
>of overhead.  There is an experiment underway for a component set that 
>does emulate Flash and it will be a bigger effort and bigger code.
>
>In the APIs for the Basic set, I tried to keep some Flex concepts and 
>APIs, but I don't think I tied the APIs to Flash.  Can you give me an 
>example of the "crud" you are talking about?  I think we can support 
>workers some day.  I still believe that it will be to your advantage to 
>be able to test your code with a "runtime verifier" which is why the 
>Basic set compiles to both SWF and JS.  Most JS tools want you to have 
>all of your code in one place.  Large apps are often built in a truly 
>modular fashion where code isn't or can't be gathered in one place.
>
>You can even use FlexJS/FalconJX compiler without the Basic component 
>set and just write ActionScript against native JS APIs or third-party 
>libraries.
>
>Or you can grow your own component set that is more tuned to what you 
>want.  It can have signals, or whatever you want.  It doesn't have to 
>run as a SWF.  All we are providing is MXML and AS compilation and some 
>default SWCs, but our SWCs don't have to be the SWCs you use.
>
>In theory, you could even get the cross-compiler to spit out Dart 
>instead of JS, but I haven't spent any time figuring out how hard what would be.
>Somebody could probably teach the compiler to handle generics and other 
>language improvements that can be output as additional code and don't 
>need runtime changes in the SWF and certainly for cross-compiled output.
>
>That's the cool part of Apache projects.  No corporation controlling 
>things. You can do pretty much whatever you want.
>
>Thanks,
>-Alex
>
>On 7/14/16, 6:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:
>
>>Hey guys, for various reasons I'm leaning towards picking Dart over 
>>actionscript for future projects, mostly because the dart language is 
>>advanced supporting async/await, generics, abstracts, and much more.
>>However I think the team behind MXML, especially in FlexJS and the layout
>>framework are second to none.   I was contemplating bringing in FlexJS to
>>dart via StageXL (http://www.stagexl.org/) an implmentation of the 
>>core flash runtine in Dart, along with a custom version of FlexJS that I would
>>cross compile to Dart.    Has anyone considered this path, and what are
>>you're thoughts about this?   Personally I don't like some of the
>>decisions made in the FlexJS project regarding supporting flash 
>>runtimes as well as JS as it adds a lot of crud to the FlexJS codebase 
>>and ties our hands limiting us specifically to the flash runtime and 
>>avoiding some
>>of the more multi-threaded oriented javascript developments.     Just
>>want to gather some opinions before me and my team start tearing into
>>this.   Some changes I would make to the FlexJS framework will include
>>using something like signals instead of string events, heavily using 
>>multiple threads for layout & rendering.
>>~ JT
>>
>


RE: FlexJS and Dart?

Posted by Jason Taylor <ja...@dedoose.com>.
again I'm refering to cross compiling the dart framework itself to dart, aka the source input will be dart and not actionscript, and will skip the FalconJX compiler completely and go straight to dart2js or dartVM.  The dart VM provides all the compile time and runtime checking you could ask for.  Canvas is widely supported these days and ridiculously more performant than dom+css as it uses the GPU where available.     Switching from actionscript to javascript is trivial as the language is almost identical, except that dart supports more features than actionscript.     I'm not talking about using Dart as an output target from FalconJX as that dosen't get us away from actionscript.  

-----Original Message-----
From: Alex Harui [mailto:aharui@adobe.com] 
Sent: Friday, July 15, 2016 1:46 PM
To: dev@flex.apache.org
Subject: Re: FlexJS and Dart?

Not so much to convince you otherwise, but in case others are curious why certain decision where made:

ActionScript is our source language.  So is MXML.  If it isn't, IMO, then it isn't Flex.  We own the compilers and can make changes to the language, even changes that won't run in a SWF if we don't care about running a SWF.

Our current cross-compiled output is JS with some dependencies on the Google Closure Library and then sent through the Google Closure Compiler for optimization, so we are using Google's resource quite a bit.

The cross-compiler could probably be taught to output Dart or TypeScript.
It was designed to have replaceable outputs.

The Basic component set leverages the DOM, but other component sets can and will leverage Canvas.

I chose to start with the DOM because at the time, some folks were still on IE8/9.  Also, the DOM seemed to have more established accessibility support.  I haven't kept up to know if there are good accessibility implementations for Canvas yet.

Anyway, good luck with your move to Dart.

-Alex

On 7/15/16, 12:58 PM, "Jason Taylor" <ja...@dedoose.com> wrote:

>I guess my main issue is actionscript itself.  The language hasn't 
>progressed much in quite some time, support for asynchronous operations 
>in just not designed into the language, lamdas, expression trees, etc
>etc, it's on it's way to a dead langage.      Our teams have put in an
>increadible ammount of work on FalconJX to support actionscript, and 
>google has put in an increadible ammount of work on running Dart in JS as
>well as the DartVM.   I however am coming to the conclusion that they
>aren't mutally exclusive in that in some early tests recompiling the
>FlexJS framework to Dart  appears to be possible outright.   As far as
>component sets and targets, that's a separate debate from FlexJS on 
>dart, and while yes using a component set that mimics the flash display 
>list might incur a performance hit, we are talking about hitting the 
>Canvas/WebGL where performance is vastly superior than targeting the DOM.
>    I think FlexJS is great, I don't think Actionscript is great, and I 
>think we could be much better off letting the google team handle 
>building the compiler tools, VM, and let us focus on our framework in 
>the best language out there.  Just my $.02, either way it's my pet 
>project now, so I'll see how far I can take this.
>~ JT
>
>-----Original Message-----
>From: Alex Harui [mailto:aharui@adobe.com]
>Sent: Thursday, July 14, 2016 10:28 PM
>To: dev@flex.apache.org
>Subject: Re: FlexJS and Dart?
>
>Hi Jason,
>
>FlexJS isn't one framework/component set.  It is being designed to 
>support a multitude of component sets.  The initial "Basic" component 
>set that we have been working on is designed to have minimum overhead 
>in its JS output.  In the Basic set, we specifically do not want to 
>emulate Flash in the browser because that will likely add another layer 
>of overhead.  There is an experiment underway for a component set that 
>does emulate Flash and it will be a bigger effort and bigger code.
>
>In the APIs for the Basic set, I tried to keep some Flex concepts and 
>APIs, but I don't think I tied the APIs to Flash.  Can you give me an 
>example of the "crud" you are talking about?  I think we can support 
>workers some day.  I still believe that it will be to your advantage to 
>be able to test your code with a "runtime verifier" which is why the 
>Basic set compiles to both SWF and JS.  Most JS tools want you to have 
>all of your code in one place.  Large apps are often built in a truly 
>modular fashion where code isn't or can't be gathered in one place.
>
>You can even use FlexJS/FalconJX compiler without the Basic component 
>set and just write ActionScript against native JS APIs or third-party 
>libraries.
>
>Or you can grow your own component set that is more tuned to what you 
>want.  It can have signals, or whatever you want.  It doesn't have to 
>run as a SWF.  All we are providing is MXML and AS compilation and some 
>default SWCs, but our SWCs don't have to be the SWCs you use.
>
>In theory, you could even get the cross-compiler to spit out Dart 
>instead of JS, but I haven't spent any time figuring out how hard what would be.
>Somebody could probably teach the compiler to handle generics and other 
>language improvements that can be output as additional code and don't 
>need runtime changes in the SWF and certainly for cross-compiled output.
>
>That's the cool part of Apache projects.  No corporation controlling 
>things. You can do pretty much whatever you want.
>
>Thanks,
>-Alex
>
>On 7/14/16, 6:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:
>
>>Hey guys, for various reasons I'm leaning towards picking Dart over 
>>actionscript for future projects, mostly because the dart language is 
>>advanced supporting async/await, generics, abstracts, and much more.
>>However I think the team behind MXML, especially in FlexJS and the layout
>>framework are second to none.   I was contemplating bringing in FlexJS to
>>dart via StageXL (http://www.stagexl.org/) an implmentation of the 
>>core flash runtine in Dart, along with a custom version of FlexJS that I would
>>cross compile to Dart.    Has anyone considered this path, and what are
>>you're thoughts about this?   Personally I don't like some of the
>>decisions made in the FlexJS project regarding supporting flash 
>>runtimes as well as JS as it adds a lot of crud to the FlexJS codebase 
>>and ties our hands limiting us specifically to the flash runtime and 
>>avoiding some
>>of the more multi-threaded oriented javascript developments.     Just
>>want to gather some opinions before me and my team start tearing into
>>this.   Some changes I would make to the FlexJS framework will include
>>using something like signals instead of string events, heavily using 
>>multiple threads for layout & rendering.
>>~ JT
>>
>


Re: FlexJS and Dart?

Posted by Alex Harui <ah...@adobe.com>.
Not so much to convince you otherwise, but in case others are curious why
certain decision where made:

ActionScript is our source language.  So is MXML.  If it isn't, IMO, then
it isn't Flex.  We own the compilers and can make changes to the language,
even changes that won't run in a SWF if we don't care about running a SWF.

Our current cross-compiled output is JS with some dependencies on the
Google Closure Library and then sent through the Google Closure Compiler
for optimization, so we are using Google's resource quite a bit.

The cross-compiler could probably be taught to output Dart or TypeScript.
It was designed to have replaceable outputs.

The Basic component set leverages the DOM, but other component sets can
and will leverage Canvas.

I chose to start with the DOM because at the time, some folks were still
on IE8/9.  Also, the DOM seemed to have more established accessibility
support.  I haven't kept up to know if there are good accessibility
implementations for Canvas yet.

Anyway, good luck with your move to Dart.

-Alex

On 7/15/16, 12:58 PM, "Jason Taylor" <ja...@dedoose.com> wrote:

>I guess my main issue is actionscript itself.  The language hasn't
>progressed much in quite some time, support for asynchronous operations
>in just not designed into the language, lamdas, expression trees, etc
>etc, it's on it's way to a dead langage.      Our teams have put in an
>increadible ammount of work on FalconJX to support actionscript, and
>google has put in an increadible ammount of work on running Dart in JS as
>well as the DartVM.   I however am coming to the conclusion that they
>aren't mutally exclusive in that in some early tests recompiling the
>FlexJS framework to Dart  appears to be possible outright.   As far as
>component sets and targets, that's a separate debate from FlexJS on dart,
>and while yes using a component set that mimics the flash display list
>might incur a performance hit, we are talking about hitting the
>Canvas/WebGL where performance is vastly superior than targeting the DOM.
>    I think FlexJS is great, I don't think Actionscript is great, and I
>think we could be much better off letting the google team handle building
>the compiler tools, VM, and let us focus on our framework in the best
>language out there.  Just my $.02, either way it's my pet project now, so
>I'll see how far I can take this.
>~ JT
>
>-----Original Message-----
>From: Alex Harui [mailto:aharui@adobe.com]
>Sent: Thursday, July 14, 2016 10:28 PM
>To: dev@flex.apache.org
>Subject: Re: FlexJS and Dart?
>
>Hi Jason,
>
>FlexJS isn't one framework/component set.  It is being designed to
>support a multitude of component sets.  The initial "Basic" component set
>that we have been working on is designed to have minimum overhead in its
>JS output.  In the Basic set, we specifically do not want to emulate
>Flash in the browser because that will likely add another layer of
>overhead.  There is an experiment underway for a component set that does
>emulate Flash and it will be a bigger effort and bigger code.
>
>In the APIs for the Basic set, I tried to keep some Flex concepts and
>APIs, but I don't think I tied the APIs to Flash.  Can you give me an
>example of the "crud" you are talking about?  I think we can support
>workers some day.  I still believe that it will be to your advantage to
>be able to test your code with a "runtime verifier" which is why the
>Basic set compiles to both SWF and JS.  Most JS tools want you to have
>all of your code in one place.  Large apps are often built in a truly
>modular fashion where code isn't or can't be gathered in one place.
>
>You can even use FlexJS/FalconJX compiler without the Basic component set
>and just write ActionScript against native JS APIs or third-party
>libraries.
>
>Or you can grow your own component set that is more tuned to what you
>want.  It can have signals, or whatever you want.  It doesn't have to run
>as a SWF.  All we are providing is MXML and AS compilation and some
>default SWCs, but our SWCs don't have to be the SWCs you use.
>
>In theory, you could even get the cross-compiler to spit out Dart instead
>of JS, but I haven't spent any time figuring out how hard what would be.
>Somebody could probably teach the compiler to handle generics and other
>language improvements that can be output as additional code and don't
>need runtime changes in the SWF and certainly for cross-compiled output.
>
>That's the cool part of Apache projects.  No corporation controlling
>things. You can do pretty much whatever you want.
>
>Thanks,
>-Alex
>
>On 7/14/16, 6:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:
>
>>Hey guys, for various reasons I'm leaning towards picking Dart over
>>actionscript for future projects, mostly because the dart language is
>>advanced supporting async/await, generics, abstracts, and much more.
>>However I think the team behind MXML, especially in FlexJS and the layout
>>framework are second to none.   I was contemplating bringing in FlexJS to
>>dart via StageXL (http://www.stagexl.org/) an implmentation of the core
>>flash runtine in Dart, along with a custom version of FlexJS that I would
>>cross compile to Dart.    Has anyone considered this path, and what are
>>you're thoughts about this?   Personally I don't like some of the
>>decisions made in the FlexJS project regarding supporting flash
>>runtimes as well as JS as it adds a lot of crud to the FlexJS codebase
>>and ties our hands limiting us specifically to the flash runtime and
>>avoiding some
>>of the more multi-threaded oriented javascript developments.     Just
>>want to gather some opinions before me and my team start tearing into
>>this.   Some changes I would make to the FlexJS framework will include
>>using something like signals instead of string events, heavily using
>>multiple threads for layout & rendering.
>>~ JT
>>
>


RE: FlexJS and Dart?

Posted by Jason Taylor <ja...@dedoose.com>.
I guess my main issue is actionscript itself.  The language hasn't progressed much in quite some time, support for asynchronous operations in just not designed into the language, lamdas, expression trees, etc etc, it's on it's way to a dead langage.      Our teams have put in an increadible ammount of work on FalconJX to support actionscript, and google has put in an increadible ammount of work on running Dart in JS as well as the DartVM.   I however am coming to the conclusion that they aren't mutally exclusive in that in some early tests recompiling the FlexJS framework to Dart  appears to be possible outright.   As far as component sets and targets, that's a separate debate from FlexJS on dart, and while yes using a component set that mimics the flash display list might incur a performance hit, we are talking about hitting the Canvas/WebGL where performance is vastly superior than targeting the DOM.     I think FlexJS is great, I don't think Actionscript is great, and I think we could be much better off letting the google team handle building the compiler tools, VM, and let us focus on our framework in the best language out there.  Just my $.02, either way it's my pet project now, so I'll see how far I can take this.
~ JT

-----Original Message-----
From: Alex Harui [mailto:aharui@adobe.com] 
Sent: Thursday, July 14, 2016 10:28 PM
To: dev@flex.apache.org
Subject: Re: FlexJS and Dart?

Hi Jason,

FlexJS isn't one framework/component set.  It is being designed to support a multitude of component sets.  The initial "Basic" component set that we have been working on is designed to have minimum overhead in its JS output.  In the Basic set, we specifically do not want to emulate Flash in the browser because that will likely add another layer of overhead.  There is an experiment underway for a component set that does emulate Flash and it will be a bigger effort and bigger code.

In the APIs for the Basic set, I tried to keep some Flex concepts and APIs, but I don't think I tied the APIs to Flash.  Can you give me an example of the "crud" you are talking about?  I think we can support workers some day.  I still believe that it will be to your advantage to be able to test your code with a "runtime verifier" which is why the Basic set compiles to both SWF and JS.  Most JS tools want you to have all of your code in one place.  Large apps are often built in a truly modular fashion where code isn't or can't be gathered in one place.

You can even use FlexJS/FalconJX compiler without the Basic component set and just write ActionScript against native JS APIs or third-party libraries.

Or you can grow your own component set that is more tuned to what you want.  It can have signals, or whatever you want.  It doesn't have to run as a SWF.  All we are providing is MXML and AS compilation and some default SWCs, but our SWCs don't have to be the SWCs you use.

In theory, you could even get the cross-compiler to spit out Dart instead of JS, but I haven't spent any time figuring out how hard what would be.
Somebody could probably teach the compiler to handle generics and other language improvements that can be output as additional code and don't need runtime changes in the SWF and certainly for cross-compiled output.

That's the cool part of Apache projects.  No corporation controlling things. You can do pretty much whatever you want.

Thanks,
-Alex

On 7/14/16, 6:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:

>Hey guys, for various reasons I'm leaning towards picking Dart over 
>actionscript for future projects, mostly because the dart language is 
>advanced supporting async/await, generics, abstracts, and much more.
>However I think the team behind MXML, especially in FlexJS and the layout
>framework are second to none.   I was contemplating bringing in FlexJS to
>dart via StageXL (http://www.stagexl.org/) an implmentation of the core 
>flash runtine in Dart, along with a custom version of FlexJS that I would
>cross compile to Dart.    Has anyone considered this path, and what are
>you're thoughts about this?   Personally I don't like some of the
>decisions made in the FlexJS project regarding supporting flash 
>runtimes as well as JS as it adds a lot of crud to the FlexJS codebase 
>and ties our hands limiting us specifically to the flash runtime and avoiding some
>of the more multi-threaded oriented javascript developments.     Just
>want to gather some opinions before me and my team start tearing into
>this.   Some changes I would make to the FlexJS framework will include
>using something like signals instead of string events, heavily using 
>multiple threads for layout & rendering.
>~ JT
>


Re: FlexJS and Dart?

Posted by Alex Harui <ah...@adobe.com>.
Hi Jason,

FlexJS isn't one framework/component set.  It is being designed to support
a multitude of component sets.  The initial "Basic" component set that we
have been working on is designed to have minimum overhead in its JS
output.  In the Basic set, we specifically do not want to emulate Flash in
the browser because that will likely add another layer of overhead.  There
is an experiment underway for a component set that does emulate Flash and
it will be a bigger effort and bigger code.

In the APIs for the Basic set, I tried to keep some Flex concepts and
APIs, but I don't think I tied the APIs to Flash.  Can you give me an
example of the "crud" you are talking about?  I think we can support
workers some day.  I still believe that it will be to your advantage to be
able to test your code with a "runtime verifier" which is why the Basic
set compiles to both SWF and JS.  Most JS tools want you to have all of
your code in one place.  Large apps are often built in a truly modular
fashion where code isn't or can't be gathered in one place.

You can even use FlexJS/FalconJX compiler without the Basic component set
and just write ActionScript against native JS APIs or third-party
libraries.

Or you can grow your own component set that is more tuned to what you
want.  It can have signals, or whatever you want.  It doesn't have to run
as a SWF.  All we are providing is MXML and AS compilation and some
default SWCs, but our SWCs don't have to be the SWCs you use.

In theory, you could even get the cross-compiler to spit out Dart instead
of JS, but I haven't spent any time figuring out how hard what would be.
Somebody could probably teach the compiler to handle generics and other
language improvements that can be output as additional code and don't need
runtime changes in the SWF and certainly for cross-compiled output.

That's the cool part of Apache projects.  No corporation controlling
things. You can do pretty much whatever you want.

Thanks,
-Alex

On 7/14/16, 6:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:

>Hey guys, for various reasons I'm leaning towards picking Dart over
>actionscript for future projects, mostly because the dart language is
>advanced supporting async/await, generics, abstracts, and much more.
>However I think the team behind MXML, especially in FlexJS and the layout
>framework are second to none.   I was contemplating bringing in FlexJS to
>dart via StageXL (http://www.stagexl.org/) an implmentation of the core
>flash runtine in Dart, along with a custom version of FlexJS that I would
>cross compile to Dart.    Has anyone considered this path, and what are
>you're thoughts about this?   Personally I don't like some of the
>decisions made in the FlexJS project regarding supporting flash runtimes
>as well as JS as it adds a lot of crud to the FlexJS codebase and ties
>our hands limiting us specifically to the flash runtime and avoiding some
>of the more multi-threaded oriented javascript developments.     Just
>want to gather some opinions before me and my team start tearing into
>this.   Some changes I would make to the FlexJS framework will include
>using something like signals instead of string events, heavily using
>multiple threads for layout & rendering.
>~ JT
>