Archive for February, 2008

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.

Flex 3 (and Flex 3 Documentation) is Live!

We started shipping Flex 3 today. Wow! This has been quite a release and, although you’re probably reading this on all the Adobe blogs, we think it’s pretty special. I know that we’ve made a number of improvements to the docs, and am going to ask the writers to create their own posts to enumerate their personal favorites. For my part, I’ll call out two:

  • The Flex 3 Getting Started Experience – With Flex 2 and 2.0.1, we had a lot of negative feedback from Flex newbies.My manager, in her infinite wisdom, gave us a lot of support in hiring Inquirium (an instructional design firm) to interview Flex developers, figure out their common patterns/problems, and create a new getting started roadmap. Some hurdles we knew about (understanding that Flex access data indirectly through a server), but others were a surprise (a lot of people got caught up with asynchronous events). We then hired Trilemetry (big thanks to Emily, Annette, and Bob) to “realize” the Getting Started Experience. This turned out to be bigger than we thought, but I think it works really well, and the Beta feedback has been extremely positive.
  • Revised table of contents (TOC) architecture for Flex Builder online Help and LiveDocs – In our work with Inquirium, it became clear that viewers weren’t thinking about “books” in the online doc experience. The revised TOC feels more navigable and I think it makes it easier to find stuff. Please check it out and let me know what you think. Note that we only did this for the core Flex books, so Flex Builder, Data Visualization, AIR, and ActionScript are still presented as books. Also note that material is still available as books through the Flex Help Resource Center.

OK. I lied. Two more things:

  • Obviously, I’m focusing on Flex, but AIR went live today, too, and this is a significant milestone for Adobe. For Flex developers, it’s pretty simple: Any app you write for the browser should just run in the AIR runtime (and the Flex 3 LiveDocs include Developing AIR Applications with Flex). You can also take advantage of the extended functionality inherent in a desktop application and I recommend scanning the discussions of windows, menus, taskbars, files, data, HTML content and Rich media content. In particular, I think the drag & drop and local SQL database discussions are cool.
  • Please use the public bugbase to report problems with the Flex 3 documentation. You can also search the bugbase to see if anyone else has already reported an issue.

Thanks everybody for your feedback during the Flex 3 Beta cycle. You made a difference.

On to Flex 4!

Measuring Message Processing Performance in BlazeDS

One place to examine application performance is in the message processing part of the application. To help you gather this performance information in BlazeDS, you can enable the gathering of message timing and sizing data.

When enabled, information regarding message size, server processing time, and network travel time is available to the client that pushed a message to the server, to a client that received a pushed message from the server, or to a client that received an acknowledge message from the server in response a pushed message. A subset of this information is also available for access on the server.

Download the new chapter’s PDF: Measuring Message Processing Performance