Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

FlexJS™ is the name for a next-generation Flex SDK that has the goal of allowing applications developed in MXML and ActionScript to not only run in the Flash/AIR runtimes, but also to run natively in the browser without Flash, on mobile devices as a PhoneGap/Cordova application, and in embedded JS environments such as Chromium Embedded Framework used in the Adobe Common Extensibility Platform . FlexJS has the potential to allow your MXML and ActionScript code to run in even more places than Flash currently does.

Overview

The primary original motivation for FlexJS is was the leveraging of existing Flex code bases. While Flash is expected to run in browsers that run on computers with traditional keyboards for years to come, existing Flex customers are finding that they want their applications to run in places that Flash/AIR will not run because some of their end users are now allowed to use devices like tablets as their only computer. The cost of migrating an application is high, and the risks around quality control are significant, especially when migrating to a less-strict language like JavaScript. A Connect presentation on FlexJS is available here .

However, as we've been working on FlexJS, it has become apparent that FlexJS should provide significant developer productivity gains for new projects as well.  Flex was popular because it made it easy and efficient to create robust applications.  Part of what made it easy and efficient was the Flash Player and AIR runtimes.  They had consistent behavior across browsers and desktop platforms.  But there were other things as well.  Flex provided:

  • Declarative Language (MXML)
  • Semi-Structured Language (ActionScript)
  • Runtime Verifier
  • Choice of IDEs.

The combination of theses things made it possible to make fewer mistakes when writing code, thus saving time and improving productivity.  Declarative Languages provide a schematic, or diagram of the pieces of the application, and are more terse than the equivalent in ActionScript or JavaScript.  ActionScript understands classes and interfaces so it can do a better job of enforcing correct usage of APIs.  The verifier catches errors at runtime.  The IDEs can provide better code assistance because the language is more structured.

Developing an application by using one or more frameworks really amounts to attaching framework components to each other via code you write.  With JavaScript, you can literally attach anything to anything.  You can assign a String to an variable that was expecting an int.  

...

How It Works

FlexJS is based on the concept of parallel frameworks. The framework components will have both an AS and JS version, and a next-generation compiler knowns as Falcon will translate MXML and AS to JS and link in JS "classes" instead of AS classes to create the JS output.

...