incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Wienberg <fr...@jangaroo.net>
Subject Re: [ASJS] Jangaroo questions
Date Fri, 07 Dec 2012 10:45:27 GMT
Hi Erik,

On Fri, Dec 7, 2012 at 8:59 AM, Erik de Bruin <erik@ixsoftware.nl> wrote:

> Hi.
>
> With the FalconJS conversation mentioning Jangaroo repeatedly and
> since I have no experience with that tool, some questions:
>
> 1) how does Jangaroo integrate with Flash Builder, allowing for
> development of the AS project in that tool?
>

I personally do not have any experience with Flash Builder.
We use IntelliJ IDEA 11 very successfully and have created an IDEA
plugin<https://github.com/CoreMedia/jangaroo-idea/wiki>that supports
Jangaroo Maven project import (see below) and takes care of
invoking the Jangaroo compiler for AS3 sources.
I also experimented with FlashDevelop and have created a FlashDevelop project
template for Jangaroo <https://github.com/fwienber/jooflash-fd-project>. It
invokes the Jangaroo compiler externally through Maven.
The trick for libraries is that instead of using SWC, they are JARs
containing AS3 source stubs. In IDEA, using a JAR containing AS3 sources
works out-of-the-box ("raw ActionScript library"), in FlashDevelop,
Philippe Elsass had to add a little feature to support that. So you see we
don't use ABC at all in the Jangaroo workflow.


>
> 2) does Jangaroo have a library of graphical user interface elements
> that you can work with "on both sides of the fence" (AS and JS)?
>
>
Almost. At CoreMedia, we use Jangaroo with Ext JS, for which there is no
Flash counterpart.
Starting as a pet project, I have re-implemented an essential part of the
Flash API in ActionScript, using the browser DOM to render the DisplayList.
The library is called JooFlash and is on
Github<https://github.com/CoreMedia/jangaroo-libs/tree/master/jooflash>.
I reverse engineered from the original Flash documentation, compared with
"real" Flash and peeked into Lightspark and DartFlash to learn. On the
Jangaroo Application page <http://www.jangaroo.net/applications/>, you find
several examples of cross-compiled Flash applications, running with
JooFlash. What's missing there is the Open Flash Chart
demo<http://jangaron.net/ofc4/data-files/joo.html>,
another pet project of mine (not OFC, but getting OFC to run with
JooFlash). OH: "How many pet projects do you have?" -- "Never, never ask me
that question again!"



> 3) if the above questions were extremely silly, what is a 'normal'
> Jangaroo workflow?
>
> Of course they are not, since this really was the main problem with
getting productive with Jangaroo.
We use Maven to build Jangaroo projects on the command line. There is also
a direct command line interface and Ant tasks, but using Maven is the best
choice for Jangaroo, because it is most convenient and supports modular
builds. Once you have Maven installed, you just need a Jangaroo project
with a POM, and Maven downloads and builds everything for you. Many
developers were irritated by the fact that when using Maven, you do not
have to download a Jangaroo SDK at all.

Then we import the Maven POM into IntelliJ IDEA, where we have full IDE
support for all ActionScript features (completion, navigation, usage
search, refactoring, documentation lookup, you name it). For fast
development turn-around, we compile from IDEA, taking advantage of the
Jangaroo IDEA plugin, which only generates the debuggable version of the
JavaScript code. A Jangaroo application can be loaded in debug
mode<http://www.jangaroo.net/tutorial/debugging/>,
so that classes a loaded a separate files, which works astonishingly well
even for larger projects (we easily use 2000+ classes). IDEA triggers
incremental compile, so that only changed classes are recompiled into the
corresponding JS file, which only takes milliseconds. When reloading in the
browser, your code changes are there.

When "workflow" also includes which libraries we use, as said above,
CoreMedias Jangaroo applications are based on Ext JS. Jangaroo's build
process includes a mechanism to load dependent JavaScript libraries, and we
created a tool to produce an ActionScript version of the Ext JS
API<https://github.com/CoreMedia/jangaroo-tools/tree/master/exml/ext-as-api-generator>,
naturally called Ext
AS<https://github.com/CoreMedia/jangaroo-libs/tree/master/ext-as>.
Like the Haxe guys, we do this for any JavaScript library used frequently,
but it is not a requirement: you can also call JavaScript directly in an
untyped fashion.

Does that answer your question? Need any more details on a certain aspect?
Feel free to ask!

Greetings,
-Frank-

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message