You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Christofer Dutz <ch...@c-ware.de> on 2014/11/10 09:23:04 UTC

[FLEX-JS] Streamlining the packaging

?Hi Alex and any others eventually working on FlexJS,


I'm still struggling to streamline the Flexmojos integration. Currently it seems as if I was to compile a FlexJS application to SWF nothing has actually changed besides the artifacts that I need to reference. When it comes to JavaScript it's a lot trickier though. I couldn't see a 1-to-1 match of SWF and JS resources. If it were to stay this way I think Maven FlexJS support will never be more than a hack causing a lot of traffic of "noob questions" on the lists.


Would it be possible to package the JS parts in the same units as SWFs?

I was thinking of one of these scenarios:

- For each FlexJS swc, a matching directory for JS exists

- For each FlexJS swc a zip containing the JS part exists

- A FlexJS module consists of a SWF which contains the JS part as static resources (After all a SWC is a ZIP)


The last option would definitely make things in Flexmojos 1000 times easier than the the others. My runner-up option would be the SWC + ZIP solution. Last would be the directory (I would simply zip that up when generating the Maven artifacts). It would be super-duper-awesome, if FalconJX would be able to work with JavaScript jars/zips directly without unpacking them, as this would be the cleanest solution.


I think these changes would need to be done anyway if tool vendors like Jetbrains would start adding support for FlexJS natively as they would have to deal with the same problems.


What do you think? I need at least a direction to finish my presentation ;-)


Chris

AW: [FLEX-JS] Streamlining the packaging

Posted by Christofer Dutz <ch...@c-ware.de>.
I would like to avoid classifiers or sopes to switch cause I am already having trouble with Maven x > 3.1 and the way currently the rsl scope is used. In Maven 3.1 they fixed a bug we were relying on (Have to admit I never knew this was a bug).

I would strongly vote +1 for all in one SWCs

Chris

________________________________________
Von: Frank Wienberg <fr...@jangaroo.net>
Gesendet: Montag, 10. November 2014 11:35
An: dev@flex.apache.org
Betreff: Re: [FLEX-JS] Streamlining the packaging

>From WebJars and Jangaroo, I have some experience with Maven artifact
packaging of Web resources, and I'd recommend to follow Christofer's advice
and bundle everything into a single artifact.
Maven *does* allow a module to produce multiple artifacts (using different
"classifiers"), but this is rather intended for usages beyond building the
actual software, like documentation, sources etc.
Greetings
-Frank-

On Mon, Nov 10, 2014 at 9:23 AM, Christofer Dutz <ch...@c-ware.de>
wrote:

> ?Hi Alex and any others eventually working on FlexJS,
>
>
> I'm still struggling to streamline the Flexmojos integration. Currently it
> seems as if I was to compile a FlexJS application to SWF nothing has
> actually changed besides the artifacts that I need to reference. When it
> comes to JavaScript it's a lot trickier though. I couldn't see a 1-to-1
> match of SWF and JS resources. If it were to stay this way I think Maven
> FlexJS support will never be more than a hack causing a lot of traffic of
> "noob questions" on the lists.
>
>
> Would it be possible to package the JS parts in the same units as SWFs?
>
> I was thinking of one of these scenarios:
>
> - For each FlexJS swc, a matching directory for JS exists
>
> - For each FlexJS swc a zip containing the JS part exists
>
> - A FlexJS module consists of a SWF which contains the JS part as static
> resources (After all a SWC is a ZIP)
>
>
> The last option would definitely make things in Flexmojos 1000 times
> easier than the the others. My runner-up option would be the SWC + ZIP
> solution. Last would be the directory (I would simply zip that up when
> generating the Maven artifacts). It would be super-duper-awesome, if
> FalconJX would be able to work with JavaScript jars/zips directly without
> unpacking them, as this would be the cleanest solution.
>
>
> I think these changes would need to be done anyway if tool vendors like
> Jetbrains would start adding support for FlexJS natively as they would have
> to deal with the same problems.
>
>
> What do you think? I need at least a direction to finish my presentation
> ;-)
>
>
> Chris
>

Re: [FLEX-JS] Streamlining the packaging

Posted by Frank Wienberg <fr...@jangaroo.net>.
>From WebJars and Jangaroo, I have some experience with Maven artifact
packaging of Web resources, and I'd recommend to follow Christofer's advice
and bundle everything into a single artifact.
Maven *does* allow a module to produce multiple artifacts (using different
"classifiers"), but this is rather intended for usages beyond building the
actual software, like documentation, sources etc.
Greetings
-Frank-

On Mon, Nov 10, 2014 at 9:23 AM, Christofer Dutz <ch...@c-ware.de>
wrote:

> ?Hi Alex and any others eventually working on FlexJS,
>
>
> I'm still struggling to streamline the Flexmojos integration. Currently it
> seems as if I was to compile a FlexJS application to SWF nothing has
> actually changed besides the artifacts that I need to reference. When it
> comes to JavaScript it's a lot trickier though. I couldn't see a 1-to-1
> match of SWF and JS resources. If it were to stay this way I think Maven
> FlexJS support will never be more than a hack causing a lot of traffic of
> "noob questions" on the lists.
>
>
> Would it be possible to package the JS parts in the same units as SWFs?
>
> I was thinking of one of these scenarios:
>
> - For each FlexJS swc, a matching directory for JS exists
>
> - For each FlexJS swc a zip containing the JS part exists
>
> - A FlexJS module consists of a SWF which contains the JS part as static
> resources (After all a SWC is a ZIP)
>
>
> The last option would definitely make things in Flexmojos 1000 times
> easier than the the others. My runner-up option would be the SWC + ZIP
> solution. Last would be the directory (I would simply zip that up when
> generating the Maven artifacts). It would be super-duper-awesome, if
> FalconJX would be able to work with JavaScript jars/zips directly without
> unpacking them, as this would be the cleanest solution.
>
>
> I think these changes would need to be done anyway if tool vendors like
> Jetbrains would start adding support for FlexJS natively as they would have
> to deal with the same problems.
>
>
> What do you think? I need at least a direction to finish my presentation
> ;-)
>
>
> Chris
>

Re: [FLEX-JS] Streamlining the packaging

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Chris, a small nitpick - please use the subject tag [FlexJS] instead of
[FLEX-JS]

Thanks,
Om

On Mon, Nov 10, 2014 at 12:43 PM, Christofer Dutz <christofer.dutz@c-ware.de
> wrote:

> Yeah ... sorry for that ... I meant SWC containing the SWF, catalog and JS
> resources.
> This way we wouldn't have to switch any maven modules/artifacts for a JS
> build, but simply select FlexJS as compilerName in Flexmojos.
>
> I just commented on an Issue in Youtrack that was just updated by
> Jetbrains with a comment that IntelliJ doesn't support FlexJS or VF2JS ...
> so I guess it doesn't support it.
>
> Chris
>
> ________________________________________
> Von: Alex Harui <ah...@adobe.com>
> Gesendet: Montag, 10. November 2014 21:30
> An: dev@flex.apache.org
> Betreff: Re: [FLEX-JS] Streamlining the packaging
>
> On 11/10/14, 12:23 AM, "Christofer Dutz" <ch...@c-ware.de>
> wrote:
> >Would it be possible to package the JS parts in the same units as SWFs?
> >
> >I was thinking of one of these scenarios:
> >
> >- For each FlexJS swc, a matching directory for JS exists
> >
> >- For each FlexJS swc a zip containing the JS part exists
> >
> >- A FlexJS module consists of a SWF which contains the JS part as static
> >resources (After all a SWC is a ZIP)
>
> I’m not sure what you mean by “module”.  Does Maven have modules?  Did you
> mean to write “SWF”?  A “SWF” is not a zip.
>
> >
> >
> >The last option would definitely make things in Flexmojos 1000 times
> >easier than the the others. My runner-up option would be the SWC + ZIP
> >solution. Last would be the directory (I would simply zip that up when
> >generating the Maven artifacts). It would be super-duper-awesome, if
> >FalconJX would be able to work with JavaScript jars/zips directly without
> >unpacking them, as this would be the cleanest solution.
>
> In another thread, someone liked the notion that a FlexJS SWC also
> contains the JS files individually (not in a ZIP) as well as the SWF and
> catalog.xml. Already we stick .css and some other files in there, and you
> can also add in asdoc.  We’d need to prove that it won’t mess up Flash
> Builder if we do that.  Is this what you meant as your “last option”?
>
> >
> >
> >I think these changes would need to be done anyway if tool vendors like
> >Jetbrains would start adding support for FlexJS natively as they would
> >have to deal with the same problems.
>
> I’ve been told Jetbrains already has implemented FlexJS support, although
> nobody has a complete answer of an eco-system of SWC from Apache as well
> as third-parties.
>
> -Alex
>
>

AW: [FLEX-JS] Streamlining the packaging

Posted by Christofer Dutz <ch...@c-ware.de>.
Yeah ... sorry for that ... I meant SWC containing the SWF, catalog and JS resources.
This way we wouldn't have to switch any maven modules/artifacts for a JS build, but simply select FlexJS as compilerName in Flexmojos.

I just commented on an Issue in Youtrack that was just updated by Jetbrains with a comment that IntelliJ doesn't support FlexJS or VF2JS ... so I guess it doesn't support it.

Chris

________________________________________
Von: Alex Harui <ah...@adobe.com>
Gesendet: Montag, 10. November 2014 21:30
An: dev@flex.apache.org
Betreff: Re: [FLEX-JS] Streamlining the packaging

On 11/10/14, 12:23 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:
>Would it be possible to package the JS parts in the same units as SWFs?
>
>I was thinking of one of these scenarios:
>
>- For each FlexJS swc, a matching directory for JS exists
>
>- For each FlexJS swc a zip containing the JS part exists
>
>- A FlexJS module consists of a SWF which contains the JS part as static
>resources (After all a SWC is a ZIP)

I’m not sure what you mean by “module”.  Does Maven have modules?  Did you
mean to write “SWF”?  A “SWF” is not a zip.

>
>
>The last option would definitely make things in Flexmojos 1000 times
>easier than the the others. My runner-up option would be the SWC + ZIP
>solution. Last would be the directory (I would simply zip that up when
>generating the Maven artifacts). It would be super-duper-awesome, if
>FalconJX would be able to work with JavaScript jars/zips directly without
>unpacking them, as this would be the cleanest solution.

In another thread, someone liked the notion that a FlexJS SWC also
contains the JS files individually (not in a ZIP) as well as the SWF and
catalog.xml. Already we stick .css and some other files in there, and you
can also add in asdoc.  We’d need to prove that it won’t mess up Flash
Builder if we do that.  Is this what you meant as your “last option”?

>
>
>I think these changes would need to be done anyway if tool vendors like
>Jetbrains would start adding support for FlexJS natively as they would
>have to deal with the same problems.

I’ve been told Jetbrains already has implemented FlexJS support, although
nobody has a complete answer of an eco-system of SWC from Apache as well
as third-parties.

-Alex


Re: [FLEX-JS] Streamlining the packaging

Posted by Alex Harui <ah...@adobe.com>.

On 11/10/14, 12:34 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>>
>> >I think these changes would need to be done anyway if tool vendors like
>> >Jetbrains would start adding support for FlexJS natively as they would
>> >have to deal with the same problems.
>>
>> I’ve been told Jetbrains already has implemented FlexJS support,
>>although
>> nobody has a complete answer of an eco-system of SWC from Apache as well
>> as third-parties.
>>
>
>Who told you that?  I was told a couple of days ago that IntelliJ does not
>yet support FlexJS [1]

That’s what folks were saying at 360|Flex in May when FDT was announcing
their support.  I don’t have IntelliJ so I was never able to verify it.
Thanks for the correction.

-Alex


Re: [FLEX-JS] Streamlining the packaging

Posted by OmPrakash Muppirala <bi...@gmail.com>.
>
> >I think these changes would need to be done anyway if tool vendors like
> >Jetbrains would start adding support for FlexJS natively as they would
> >have to deal with the same problems.
>
> I’ve been told Jetbrains already has implemented FlexJS support, although
> nobody has a complete answer of an eco-system of SWC from Apache as well
> as third-parties.
>

Who told you that?  I was told a couple of days ago that IntelliJ does not
yet support FlexJS [1]

Thanks,
Om

[1] https://youtrack.jetbrains.com/issue/IDEA-116986

Re: [FLEX-JS] Streamlining the packaging

Posted by Alex Harui <ah...@adobe.com>.

On 11/10/14, 12:23 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:
>Would it be possible to package the JS parts in the same units as SWFs?
>
>I was thinking of one of these scenarios:
>
>- For each FlexJS swc, a matching directory for JS exists
>
>- For each FlexJS swc a zip containing the JS part exists
>
>- A FlexJS module consists of a SWF which contains the JS part as static
>resources (After all a SWC is a ZIP)

I’m not sure what you mean by “module”.  Does Maven have modules?  Did you
mean to write “SWF”?  A “SWF” is not a zip.

>
>
>The last option would definitely make things in Flexmojos 1000 times
>easier than the the others. My runner-up option would be the SWC + ZIP
>solution. Last would be the directory (I would simply zip that up when
>generating the Maven artifacts). It would be super-duper-awesome, if
>FalconJX would be able to work with JavaScript jars/zips directly without
>unpacking them, as this would be the cleanest solution.

In another thread, someone liked the notion that a FlexJS SWC also
contains the JS files individually (not in a ZIP) as well as the SWF and
catalog.xml. Already we stick .css and some other files in there, and you
can also add in asdoc.  We’d need to prove that it won’t mess up Flash
Builder if we do that.  Is this what you meant as your “last option”?

>
>
>I think these changes would need to be done anyway if tool vendors like
>Jetbrains would start adding support for FlexJS natively as they would
>have to deal with the same problems.

I’ve been told Jetbrains already has implemented FlexJS support, although
nobody has a complete answer of an eco-system of SWC from Apache as well
as third-parties.

-Alex