Migrating applications from Flex 2 to Flex 3

Migrating from Flex 1.x to Flex 2 was — how can I put it — painful. We scrubbed the APIs to make them consistent; as a result, many properties, methods, events, and even some constants changed, and sometimes changed again. We added and removed classes and interfaces. Heck, we even changed the capitalization of “Void” to “void”. In addition, the underlying language went from ActionScript 2.0 to ActionScript 3.0. There was no shortage of tasks for updating apps from 1.x to 2.

This time around, however, the APIs have already been through the scrubbing and many of the issues have been ironed out. Most of the migration duties you’ll encounter will be related to updated features, like:

Localization — The l10n system has changed alot (for the better!). It’s now much simpler to implement, and it supports runtime locale-switching. You can use the same properties files, but you might have to rewrite the way they are accessed. Check out the localization doc.

Style properties — A number of style properties have changed to support the new subcomponent style feature.

Deep linking — This is a new feature, but if you were using the HistoryManager class, you really should switch to using the BrowserManager class to do all your browser/Flex app communication.

Compiler and configuration args — A few compiler arguments have changed. If you use config file or ant tasks to do your compilation, you might have to modify your files.

Here are some resources that should help with migration issues:

  • Deprecated elements in the Language Reference — A list of all the class elements that are now deprecated. The compiler will also warn you about these when you try to compile, but you can get a sense of what has changed from this list.
  • Backwards compatibility — This includes a list of differences between the configuration files for SDK 2.0.1 and SDK 3, as well as a list of the changes to the framework.
  • Understanding Flex 3 Migration Issues on Joan Lafferty’s blog: Part 1 and Part 2

It’s also important to realize that with Flex Builder 3, you can compile your apps against the new compiler (version 3), or against any version of the compiler that you have installed. This way, if your code does not use any of the new features and you don’t want to migrate yet, but you want to use Flex Builder 3, then you can without any issues. Of course, there’s doc on that, too.

7 Responses to Migrating applications from Flex 2 to Flex 3

  1. Handi says:

    Kudos to Flex Doc Team!Keep up the good work!

  2. Stephen Buckley says:

    Great work guys,Do you have any idea when the whole of the documentation will be available as one zip file.Unfortunately some of us have to work occasionally connected as well as our apps ;o}

  3. Matthew J. Horn says:

    There is a complete doc ZIP here:http://livedocs.adobe.com/flex/3/flex3_documentation.zipThat ZIP includes HTML for the langref, plus all the PDFs for the other books.hth,-matthew j. hornflex docs

  4. adobe flex says:

    great stuff ! thanks !!

  5. j4y says:

    Thanks! this is just what I was looking for. Are there any other guides for flex 2 to 3 conversion?