Saturday, February 24, 2007

My FlexBuilder 2 Review

With ActionScript 3 and the Flash 9 player, Adobe has taken their Flash platform forward by a quantum leap. Flash is now a serious solution -- some would say the superior solution -- for developing browser-based applications. It is now possible to do Flash programming entirely using standards-based languages: UIs can be laid out using a dialect of XML, and the ActionScript language has been completely renovated and made compliant with a recent draft of the ECMAScript specifications. Pretty much the only thing you can't do is interact directly with the user's desktop PC (but this is coming soon with Apollo).

I've spent a lot of time exploring open source Flash development options (OK, you can call me stingy), but I finally decided to take the plunge and purchase FlexBuilder 2, Adobe's high-end IDE. FlashDevelop was my tool of choice for ActionScript 2 work, but their current solution for writing ActionScript 3 is imperfect, and there's no indication when their next major release will be out.

After playing around with FlexBuilder for a few days, I am very pleased with the product. The Design Mode is surprisingly good. I was able to lay out components extremely quickly. In fact, the auto-alignment functionality is an improvement over what's in Flash 8. It's really satisfying to be able to drop a button into a layout and "nudge" it into the right place without having to fiddle with exact pixel values. Customizing controls is also easy... at least in so far as making minor adjustments to borders and colors. Designing a UI that does not look "flex-like" I'm sure will be a lot more work.

The two major ingredients of the Flex development process are MXML files and ActionScript classes. I expect that becoming comfortable with MXML will be a major hurdle for Flash 8/AS2 developers. It turns out these two things are one and the same; once I made the connection that MXML ends up compiled down to ActionScript the whole framework started to make a lot more sense.

The changes to the ActionScript language take some getting used to, but are much-needed. Many inconsistencies that have built up over the years have been eliminated. For example, MovieClip properties no longer have an underscore before the property name. In general, things have been made more object-oriented and legacy features of the language have been eliminated. A detailed list of the changes can be found here.

The coding support in FlexBuilder is on par with FlashDevelop. So far my favorite new coding feature is that the editor adds in "import" statements for you automatically when you declare a variable using that data type. I love clever things like that.

The FlexBuilder 2 IDE is based on the Eclipse platform, which is an extremely powerful and extensible framework upon which just about any kind of IDE can be built. Unfortunately, Eclipse is a double-edged sword. On the plus side, it provided Adobe's developers with many excellent features right out of the box, including CVS integration. Unfortunately, there are some aspects of Eclipse that are quite arcane, and are sure to be off-putting for less experienced developers. Open the Preferences dialog box and you'll be overwhelmed by numerous inscrutable options related to "Perspectives" and "Workspaces". Also, for some bizarre reason, Eclipse has never supported Word Wrap. Even on a large monitor, this can be irritating because ideally you'll wan to have Flex and the browser window visible at the same time.

Another drawback of Eclipse is that it is a serious resource hog -- typically eating up 300MB RAM on my system. That said, my aging 3.2 ghz Pentium PC with 1 gig of RAM is able to run the program perfectly acceptably.

I was disappointed that FlexBuilder cannot launch an SWF file within the IDE itself, but instead you need to launch in a web browser. FAMES already demonstrated that it is possible to run an SWF within Eclipse, so hopefully someone will develop a plug-in for this, but I would have expected it to work out of the box. Also, you can't pipe trace messages into the IDE. Instead they're logged to a text file. Fortunately, there is a plug-in for Firefox that displays traces in the browser.

The documentation is quite good. I was pleasantly surprised to find that my boxed copy included an informative 200-page "Getting Started" guide. For the most part I was able to find what I needed in the Help -- and I definitely needed it! The one thing I would have liked would have been more information for ActionScript 2 developers transitioning to Flex, especially related to using MXML.

Flex is designed for professional developers first. Those not comfortable with OOP, or those who haven't dealt with a complex IDE like Eclipse, are going to face serious obstacles. However, for programmers who already have significant experience with Flash, Java or .Net, it is pretty close to heaven.

Pro: The most powerful Flash development environment ever.
Con: High barrier to entry.
Final Score: 4/5


Post a Comment

<< Home