On 3/22/15, 4:49 AM, "TeotiGraphix" <teotigraphix...@gmail.com> wrote:

>Well I voted for it.
>
>To be honest, I am still in the complete dark with FlexJS, what/how it
>does
>what it does and the new component model. I just thought i would drop this
>line to see what the happenings are currently.

There’s information on the wiki:
https://cwiki.apache.org/confluence/display/FLEX/FlexJS

But in short, FlexJS uses a combination of cross-compilation and class
substitution.  As you may know, the Falcon compiler has the notion of
compilation units.  There are compilation units from SWCs and compilation
units from MXML and AS.  Falcon converts MXML and AS to ABC and combines
it with the ABC from the SWCs and outputs a SWF.

FalconJX converts MXML and AS to JS, but for SWC compilation units, it
tries to find a JS file of the same name.  IOW,
org.apache.flex.core.UIBase.as is expected to have an
org.apache.flex.core.UIBase.js.  Some of those JS files are created by
cross-compiling AS to JS in library projects.

>
>I helped write the Randori IntelliJ plugin with doublefx back in 2013.
>That
>plugin used the FalconJX cross compiler and it worked awesome, just nobody
>wanted to use Randori. That was like 600+ hours of my time down the drain
>with the plugin and actually writing FalconJX.
>
>So in a way, I am trying to weigh the pluses and minuses about developing
>something that might not get used.

Maybe some of that can be repurposed for FlexJS.  The gotcha of
volunteer-driven technology is that if nobody works on it, it will never
get used, but the cool thing about Apache projects is that “everyone” can
contribute and those who contribute can help make it something they want.

>How would FlexJS integrate with WebGL? I am naive about this.

Well, I don’t know anything about WebGL, but essentially, any common
pattern of code in any language should be encapsulated.  For JS, if you
can stick a class-like API surface on that encapsulation, then you can
emulate or mock that thing in AS.

So if you always write the same sequence of JS code to draw a 3D sphere of
a color, radius, and light source, you might write in JS:

Sphere = function()
{
}

Sphere.prototype.drawSphere = function (color, radius, lightSource)
{
  // whatever WebGL and other code you need
}

And in AS you would write:

Class Sphere
{
   function drawSphere(color:int, radius:Number,
lightSource:Coordinate):void
   {
       // code that does the equivalent for Flash.
   }
}

The reason I said “mock” is because, if you don’t actually care about the
SWF version, you can just write a mock that saves enough space on the
screen or does a cheap emulation of the JS version just so the person
using the library can exercise the rest of their logic.  This is the key
thing for FlexJS:  we are trying to make it more efficient to write the
code you use to glue other people’s code together.  The AS VM’s verifier
helps you by finding API surface incompatibilities sooner than you might
otherwise.

-Alex

>
>Mike
>
>On Sun, Mar 22, 2015 at 6:57 AM, piotrz [via Apache Flex Development] <
>ml-node+s2333347n45700...@n4.nabble.com> wrote:
>
>> Hi Mike,
>>
>> I am glad that another person is intrested to helping out with FlexJS!
>>:)
>> We are growing! :)
>> Voting on this ticket would be for sure help to get closer support for
>> FlexJS in Intellij.
>> https://youtrack.jetbrains.com/issue/IDEA-116986
>>
>> They need to know how much we wanted to this feature. :)
>>
>> Thank you and Good Luck with setup! :)
>> Piotr
>> Apache Flex PMC
>> piotrzarzyck...@gmail.com
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>>discussion
>> below:
>>
>> 
>>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-compiler-tp45
>>680p45700.html
>>  To unsubscribe from FlexJS compiler, click here
>> 
>><http://apache-flex-development.2333347.n4.nabble.com/template/NamlServle
>>t.jtp?macro=unsubscribe_by_code&node=45680&code=dGVvdGlncmFwaGl4bGxjQGdtY
>>WlsLmNvbXw0NTY4MHwxMjE5OTE3NzQ2>
>> .
>> NAML
>> 
>><http://apache-flex-development.2333347.n4.nabble.com/template/NamlServle
>>t.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabbl
>>e.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace
>>-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21
>>nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_ema
>>il%21nabble%3Aemail.naml>
>>
>
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-compiler-tp456
>80p45701.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to