> So, I’m not quite clear what you are working on. If you want to create a
> new loading system that’s fine, but IMO we also need a way for folks to
> choose the loading system of their choice. I would imagine we’d allow
> folks to select different js-output-type that not only selects a backend,
> but also selects a publisher, but I haven’t thought this all the way
> through.

Ok, so, it means I haven't been clear, I'm not trying to create a new loading 
system at compiler level.

Playing with the externs, we've seen that in order to customize our index.html 
(adding a Script tag for JQuery for example) we had to create another 
index.html outside the build folder referencing our main .js because the 
original one was overridden each time we built, so, instead of doing that, I 
was looking for a way to write our Script tag from AS which is not possible at 
the moment and we haven't got a template index to use neither.

ok, IIUC, the goal of having externs is to ease the implementation of as/js 
components giving the possibility to implement them in AS and use the generated 
JS as JS source of the new FlexJS component, so, we can, in the generated JS, 
add a comment to load a JS Script or CS.

But still, if I look at the jQuerySample.mxml, I can see something that should 
be done at each build, not every user friendly:
<!--
    To make this sample work, please add the following lines to the index.html
    
    <link rel="stylesheet" 
href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css"; />
    <script src="http://code.jquery.com/jquery-1.9.1.js";></script>
    <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js";></script>
    -->

So, my goal was to simplify link and script tags either making them accessible 
from the AS via a MataTag for example or having an utility class to download 
dynamically those resources and add them to the head of the html application 
container.

Am I clearer ? Did I miss something ? Is that a bad direction ?

Thanks,
Frédéric THOMAS


----------------------------------------
> From: aha...@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FalconJX FlexJS] JQuery up and running, a nightmare but we now 
> have 1.9 in AS
> Date: Tue, 23 Jun 2015 13:07:12 +0000
>
>
>
> On 6/23/15, 5:44 AM, "Michael Schmalle" <teotigraphix...@gmail.com> wrote:
>
>>On Tue, Jun 23, 2015 at 8:36 AM, Frédéric THOMAS <webdoubl...@hotmail.com>
>>wrote:
>>
>>> It worked, it was just because I didn't know well how to use jQuery in
>>> that context, so, I will create utility classes to deal with
>>>downloading of
>>> scripts and css if no one see any issue to this approach ?
>>>
>>> The one I see compare to a new language feature is that it will create a
>>> delay for the generated page before it will be totally functioning, in
>>>the
>>> other hand, a new language feature is much more complicated to
>>>implement.
>>>
>>
>>Fred, can you elaborate on this? I don't quite understand what you are
>>saying, .... "an new language feature", for the loading of scripts and
>>dependencies?
>
> Let’s sync up a bit here so we don’t duplicate effort. By ‘bootstrap
> infrastructure’, I mean everything else that is needed to truly run an
> app. Just look at a slightly more complex HelloWorld.as example. It
> needs an index.html, probably a CSS file or two, and then it has to load
> more than just the cross-compiled .js file. It may need to load Jquery,
> or other .js files that represent components like a Label or Button.
>
> Today, with the nightly build with FLEXJS as the js-output-type,
> MXMLFlexJSPublisher.java will generate an index.html, and a CSS file if
> required. That index.html will load .js files using goog.require. We
> have discussed how to get Jquery loaded by inserting a magic token in some
> AS comments.
>
> Besides goog.require, other popular script loading systems are RequireJS
> and I think AMD and maybe others. It isn’t clear to me there is any
> advantage to writing our own because these loading systems are well-tested
> by now, and I think some companies and “standardized” on one of them so
> writing our own may not be a solution that always gets adopted. That is
> one reason FlexJS supports JQuery: some companies have standardized on it.
>
> So, I’m not quite clear what you are working on. If you want to create a
> new loading system that’s fine, but IMO we also need a way for folks to
> choose the loading system of their choice. I would imagine we’d allow
> folks to select different js-output-type that not only selects a backend,
> but also selects a publisher, but I haven’t thought this all the way
> through.
>
> -Alex
>
                                          

Reply via email to