I've been enthusiastically telling fellow Java developers about the many benefits of using Flex with Java EE back-ends in recent months. As part of this effort, I have presented on the benefits of Flex at conferences and a common question at the conferences and in person when talking with developers is "What is the difference between Flex 2 and Flex 3?" This is a bigger question than I can hope to answer, but I will document the differences that are most important to me in this blog entry.
The first and most important observation related to comparing Flex 2 to Flex 3 is that the changes are nowhere near as significant as going from Flex 1 (or Flex 1.5) to Flex 2 (or from ActionScript 2.0 to ActionScript 3.0). Because many of us started using Flex after Flex 2 was already available, it is shocking to us when we learn what Flex 1 and 1.5 were and how different Flex 2 was. With the transition from Flex 2 to Flex 3, there are new features and enhancements, but nearly everything written in Flex 2 will work in Flex 3 and even much of your new code will probably remain unchanged from what you would have written in Flex 2.
An obvious starting point for looking at what's new in Flex 3 is the Adobe Developer Connection (Flex Developer Center) article What's New in Flex 3? by Matt Chotin. This article covers some of the new features you see listed in association with Flex 3 in other articles and blogs: native support of Adobe Integrated Runtime (AIR), new components,
FlexBuilder enhancements, the Persistent Framework Cache, and (most importantly to some) the open sourcing of Flex compiler and SDK.
The Flex 3 SDK Release Notes and the Flex 3 Builder Release Notes are two more obvious sources of information about differences in Flex 3 as compared to Flex 2. The Flex 3 SDK Release Notes list many of the same new features as the Chotin article mentioned above, but also include later developments and additional information. We see in this document that the Flex Charting package was significantly enhanced for Flex 3 and that the two newly added components (Advanced DataGrid and OLAP DataGrid) are only available with FlexBuilder professional. These are, of course, not benefits to users solely of the free SDK. However, we also see in these Release Notes that the Flex Ajax Bridge Library is now a standard part of the Flex SDK and there is more information on the open sourcing of Flex 3. The FlexBuilder 3 Release Notes have an even longer list of enhancements, but I don't intend to go into those here.
As one can ascertain from the above descriptions, users of Flex-related products with licensing fees (FlexBuilder, Charting Package, etc.) enjoy many of the Flex 3 enhancements that the open source, freely available SDK does not. Perhaps the most disappointing to me free SDK omission was the only two newly added Flex 3 components not being included with the free SDK (although Flex charting is really nice and I'd love to see that in the free SDK as well).
One thing worth pointing out to people is that Adobe open sourced BlazeDS before they released Flex 3. While it is easy to think of the release of BlazeDS and Flex 3 as one and the same, they were actually two separate releases. This made BlazeDS freely available to Flex 2 developers and it is likewise available to Flex 3 developers as well.
There are already some interesting consequences from the open sourcing of Flex 3. For example, Flex SDK Code Conventions and Best Practices has been released. I am sure that many organizations will adopt these for their own just as many organizations using the Java programming language have adopted Sun's Java Coding Standards.
In this entry, I've referenced some of the highlights of new features of Flex 3 and even elaborated on a few of them. However, there are smaller enhancements that are very useful. One of these is the conditional compilation.
I have run into very few issues migrating from Flex 2 to Flex 3. However, the document Flex 3: Backwards Compatibility and Migration is useful to have handy as a reference when doing such a migration. Another useful reference is Migrating Applications from Flex 2 to Flex 3.
There are numerous resources covering the differences between Flex 2 and Flex 3. For anyone starting greenfield projects, I enthusiastically recommend beginning with Flex 3. Even though there are not a lot of books available on Flex 3 yet, Flex 2 is so similar and there are so many things in common that a good Flex 2 book will help developers get going quickly even with Flex 3. Likewise, online Flex 2 resources will generally be applicable to Flex 3 as well. In addition, there are new Flex 3 resources available all the time.
I really enjoyed using Flex 2 and Flex 3 and look forward to the enhancements that will be delivered with Flex 4 (Gumbo) in the future.
Additional Resources Comparing Flex 3 to Flex 2
* Flex 2 vs. Flex 3
* Flex 3 - The Most Important Feature
* Flex 3 New Features Collection
* Dramatically Smaller Flex SWF Files
* Components and SDK Enhancements
* Flex 3 Code Enhancements
* Flex 3 New Charting Features
* My Thoughts on Flex 3 Features - Part 1
* My Thoughts on Flex 3 Features - Part 2