flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] Framework using externs (was: Setup Error)
Date Tue, 01 Dec 2015 19:37:28 GMT

On 12/1/15, 11:13 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com> wrote:

>Hi Alex, that sounds amazing.
>One question for me is what you refer as "externs". Could you share what
>this means?

Externs are like header files for JS libraries.  Michael Schmalle made it
possible to create a SWC like our js.swc that contains the
playerglobal.swc equivalent for the browser.  It contains HTMLElement,
Document, Window, XMLHTTPRequest, etc.  The source for the externs comes
from Google Closure Library.

This allows us to write fully functional JS applications and frameworks by
writing them in AS, even in an IDE with code completion, and outputting
JS.  The FlexJS 0.5.0 framework currently consists of thousands of lines
of JS code handwritten by Peter and I and others.  We are almost done
rewriting those JS files in AS.  The advantages are significant.  The
compiler catches things sooner, we don't waste time forgetting to type
'this.' or debugging when we do, we don't waste time typing out package
path names, etc.  Also, the AS code for the SWF and the JS code for the
browser for any particular component often shared quite a bit of code and
now all that shared code is in one file with conditional compiles for JS
or SWF-specific code.  In the end, I now strongly believe that AS is a
better language for writing JS.
I expect that we'll be able to create components in FlexJS much more
quickly this way.


View raw message