On Mon, Jun 22, 2015 at 5:22 PM, Alex Harui <aha...@adobe.com> wrote:

>
>
> On 6/22/15, 2:14 PM, "Michael Schmalle" <teotigraphix...@gmail.com> wrote:
>
> >On Mon, Jun 22, 2015 at 12:28 PM, Frédéric THOMAS
> ><webdoubl...@hotmail.com>
> >wrote:
> >
> >>
> >> > FlexJS uses the MXMLFlexJSPublisher.java which uses GoogDepsWriter.
> >> > GoogDepsWriter scans the .js files for an <inject_html> tag and adds
> >>that
> >> > to the index.html. Not quite sure how the externs can take advantage
> >>of
> >> > that. In the flex-asjs repo, see:
> >> >
> >> >
> >>frameworks/projects/Jquery/js/src/org/apache/flex/jquery/Application.js
> >>
> >> Not sure we can use it without to modify the falcon front end / backend
> >>to
> >> introduce a way to inject html from AS (from MetaTag or whatever things,
> >> AFAIU, it would imply to add a new token, scan, parse and emit it in
> >>JS.)
> >> but if the plan as I understood it, is only to build AS/JS components
> >>with,
> >> there is no need for that feature as we can insert it has done today, in
> >> the generated JS, if the plan is to write JS applications (as some of us
> >> did recently playing with those externs), there is a room for such a
> >> feature, do we want FlexJS to embark such feature ?
> >>
> >
> >Well I think the plan of the FlexJS framework hasn't changed but, I wrote
> >the externs stuff so I could play around with a pure JS app in AS.
> >
> >So I think the real question is, how is a pure JS app going to be setup,
> >since I don't have a lot of experience with this stuff yet, you are saying
> >that stuff can be injected into the index.html right now?
>
> Yes.  We look through the .js file line-by-line for a special marker,
> which is hidden inside comments to the JS doesn’t get evaluated.  So
> actually, we could inject this HTML from AS simply by having the
> cross-compile copy over comments from AS to JS.
>
> I’ve been pondering what the packaging options might be.  Right now folks
> are getting things to run because after we cross-compile the AS to JS,
> Google Closure Library classes are mixed in in order to get scripts
> loaded, and an index.html is generated to call all of that.  We might give
> folks options for different “Publishers" that package different
> bootstrapping infrastructure with the cross-compiled code.
>

Ok, this is what I was getting at and what I meant abut not having enough
experience to know what bootstraping code would be needed other than some
Main() kicking it off. I know that dependency loading is another huge
avenue that has many frameworks out there.

Do you think it would be advantageous for me to spend some of my free time
researching like RequireJS, AMD etc? So we could out of the box offer these
publishers to make it even more attractive?

SIDE NOTE: I was thinking the other day, once this stuff works really good,
externs, FlexJS, if you are minimizing your code and it's a Single page
application, it really doesn't matter what code you use to get there.
ActionScript, TypeScript, raw JS, it's all about the end result. I think
this gives me a new perspective with what we are working on right now. I
know Om posted that example on Friday and he got 21+ retweets and about 15
favorites on twitter.

Mike



>
> -Alex
>
>

Reply via email to