Thanks Alex.

I was just curious. I am not concerned about the size, just about whether
or not it was 'correct'.
I would assume that we will increasingly have js-only swcs in any case,
because of less interest in swf builds outside of the framework swcs.

I think the ANE format for AIR was another good representation of unified
swcs, but iirc it had nested swfs for each implementation as well as a
top-level API-like swf (I might be wrong about that, just going from
memory).








On Fri, Jan 7, 2022 at 11:19 AM Alex Harui <aha...@adobe.com.invalid> wrote:

> In theory, (and this was true back when Royale/FlexJS first got going),
> the APIs were sufficiently identical.  Maybe not truly identical, but
> enough that you could have one application code base without
> COMPILE::SWF/JS conditionals that could run in Flash or in a browser.  In
> theory, all COMPILE::SWF/JS was buried in the framework SWCs themselves to
> make the API surface effectively the same.
>
> And then, because Flash Builder projects could only specify one set of
> SWCs, then FlexJS/Royale had "unified" or multi-platform SWCs.  In any SWC,
> the SWF code in library.swf did the Flash implementation and js/out did the
> browser implementation.  And if we ever had another target, it would also
> get packed in (cpp/out)
>
> I would like to think this is still almost completely true.  The "write
> once, run in Flash or Browser" still works.  I've seen JS-only APIs added
> that don't have Flash implementations, but for any API that was supposed to
> do what Flash could do, hopefully the JS equivalent has a similar enough
> API surface that the app using that SWC doesn't need conditional
> compilation.
>
> Could the Maven SWF SWCs be made smaller without the js/out folder?  Yeah,
> probably.  But you might need to keep js/out for the distribution that
> tries to mimic a Flash Builder compatible SDK.
>
> HTH,
> -Alex
>
> On 1/6/22, 2:06 PM, "Greg Dove" <greg.d...@gmail.com> wrote:
>
>     We have swf-swcs and js-swcs. Maven puts them alongside eachother, ant
> puts
>     them in the two separate folders (swf in the original project folder,
> js
>     inside corresponding projectJS folder in the sibling file structure).
>
>     Question:
>     Why do the swf-swc builds have js out content inside them? I think
> that in
>     quite a few cases the 'swf' representation (which contains the
> definitions
>     loaded by the compiler) of the js in the js build is probably a little
>     different to the 'swf' representation inside the swf build because
> there
>     can be  api differences between js and swf (via COMPILE::SWF and
>     COMPILE::JS differences etc). So I assume that it is not  the general
> case
>     that we would have a unified swc. If so, why does the swf-only swc
> build
>     contain js files?
>
>

Reply via email to