Versions Compared

Key

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

...

  • Create a Flex Library project in FlashBuilder for the srcsource/as/FlexJSUI folder. It should output a FlexJSUI.swc
  • Create an Actionscript-Only project in FlashBuilder for the srcsource/as/FlexJSTest/FlexJSTest.as folder and file. Don't use the .mxml file as the application as the compilers don't know how to codegen in the "new way". FlexJSTest.as should compile into a runnable SWF. A click on the button should change the text. Note that the SWF is only about 11K!
  • Now copy all of the .as files to a folder somewhere.
  • Copy the FlexJSUI.swc as well.
  • Run FalconJS on the FlexJSTest.as file. You should get a set of .JS files.
  • Make a subfolder called js
  • Copy the adobe.js from the FalconJS source tree to the js folder
  • Copy the framework.js from the FlexJSsource/js folder to the js folder
  • Copy the index.html from the example/FlexJSTest folder
  • Run the index.html in a browser (I've seen it run in FireFox on Mac for me).

...

Essentially, Flex 3's API is a shorthand for the more verbose but more flexible Flex 4 pattern. Similarly, we will create components that bundle common combinations of beads.

Pros and Cons

Pros

  • SWFs will be smaller (the example SWF is 11K) and should run faster mainly because there is less code running just-in-case.
  • Beads make it easier to unit test pieces
  • Beads encapsulate platform-specific code from platform-independent code
  • Composition encourages more code re-use for smaller and faster apps

...