Flex Builder 3 Review

This is a review that is kind of odd to write. I've been using Flex Builder 3 for such a long time that I'm now having a hard time remembering how Flex Builder 2 was. It's strange how public betas and the new open policy at Adobe changed this. The Flex 3 release offers nothing new in terms of Flash Player features but the new IDE, an expanded SDK and authoring for the AIR runtime is definitely worth the upgrade.

What is it? Actionscript and Flex Framework IDE based on EclipsePlatforms: Windows, OSX (and soon also Linux)Manufacturer: AdobeWebsite:http://www.adobe.comCost: Upgrade from $99, Standard version $249, Professional $699 (with graphing components)

Back when formerversionsof Flashand Flexwere released, Flashmagazine was able to provide in-depth reviews of a product that nobody knew much about. Today, anyone interested can download the public beta of forthcoming products and even before that, the product teams will reveal most of the core new features. Just as the Flex 3 launch was done, we started hearing of what's planned for Flex 4. This openness also produces some odd side-effects, so it now requires some cleverness in how and when new features are presented from Adobe.

Flex 4 will be co-developed with the community but Adobe will still decide what goes into the product. The Flex bug-base will be public and it will also serve as a wish-list for the upcoming release. I'm now so used to Flex 3 that to do this review, I had to fire up my old, trusty PC and restart Flex 2 just to remember what the old version was like. Add the fact that so many already know the program well - this review is incredibly strange to write...

How public betas change the game

In general, the first public beta is the time when we get to see major new features. After that version is public, the focus of the development team will usually be on solidifying the existing product, not adding new features. Documentation will be sparse though and this generates a nice, steady stream of community discoveries that help keep the buzz going. It's really amazing how this has changed the software industry and I totally love it. Being able to remove bugs that could have made it into the product is cool and trying out new stuff is always fun as long as the product is fairly stable.

A public beta garners much more users than the former closed betas so, it's important to Adobe that all obvious and critical bugs are cleared quickly. If not, all the bug reports will focus on these and not the stuff that is important to nail. There is a definite limit to what the product teams can discover through pre-made use cases and general testing. The process is double beneficial - users get free software (for a limited time) and can try out new stuff to be ahead of the game. The publisher gets all the feedback they need and often even more than they need. Filtering bug reports has become science for companies. The end result is software with way less bugs than before - even if the software is now many times as complex.

Adobe Labs - the place to check out Adobe software before it's finalized

CSS Design view

One thing that you won't find in Flex 3 is the link to the "Flex Style Explorer". This external application is now replaced with a Design-mode button for CSS style-sheets. If you inspect a Datagrid, you'll see a static Datagrid preview showing style and rollovers. If you select the styles for a scrollbar, you'll see all the possible states for the scrollbar. The previews are not Live, so you can't interact with the component as you could in the Style Explorer. On the other hand - you now have this in the same environment as your application, so you can just open the app to try the interaction. The skinning is really solid and you can both Style using CSS and Skin using bitmaps and properties from the same view.

Refactoring - a great timesaver

One of the Flex 3 buzzwords is "Refactoring", but what is it? Imagine you have a big project consisting of many class files. All these files use a Logger class that help you debug the application. What if you need to change the name of that class, used in every function in all those files? Refactoring is the solution. Right click the class name, select Refactor from the popup menu and Flex 3 will rename every instance in every file in your entire project. Refactoring can be done on many levels and this is the most basic form of refactoring. It's a great timesaver and we hope it'll improve further with the next version of Flex. We have experienced some occasions where this function does not work 100% but we think it's related to a bug detailed further down this article (What's not to like).

Service inspection and code generation

Ever connected to web services with Flex 2? Doesn't it feel strange that you have to type in every detail for every method on the service? Flex 1.5 would inspect the service and add all the required methods for you. For some reason, this feature did not make it into Flex 2, but now it's back.

Not only that, Flex 3 also supports Scaffolding, automatic code generation for connecting, adding, removing and updating records in databases. This'll save you hours when prototyping. It requires a bit of setup to get this working and we've not yet tried it fully, but it looks really promising for rapid prototyping scenarios.

Flash Player 9, update 3 added a new feature that allows for caching the framework locally on the users computer. For large applications that are based heavily on the standard framework, this is a great addition. With this super-simple file containing just one button, there's not much to gain. The file itself looks great at just 47Kb, but you will also have to publish the accompanying framework SWF. This one weighs in at 535Kb as it contains the complete framework.

We initially hoped this feature would support caching other parts of the application, but it will only work with the Adobe signed framework, not your own components / code.

New design constraints

One of the things that added to the size of the framework is the enhanced design constraints. These will make it possible to create layouts not formerly possible in Flex 2 using the new containers called ConstraintColumns and ConstraintRows. Click here for a good write up of the new possibilities.

Profiling CPU and memory

This is something we've wanted for a long time! If your application has a memory leak, it can be really hard to pinpoint where the problem is. With the new profiler, you'll instantly see what objects are eating your memory. The profiler will let you inspect what ActionScript classes are being instantiated in real-time. By watching the combination of memory use and instances created, you'll see where garbage collection fails.

The profiler has a filter for viewing only a selection of classes and you can also force garbage collection. We do miss the ability to "clear" the Live Object information on demand. The Performance snapshots are great for figuring out CPU usage, but quite complex on big apps. It would be great to know what the CPU is chewing on in more general terms. Not exactly sure how that would work though as the CPU usage is a bit more complex than the memory bit.

A small annoyance is that when you close the SWF being profiled, the profiling panels will still display data. The next time you profile, Flex Builder will open another set of tabs so if you forget to close the panels between sessions, you'll get a lot of "dead" tabs. There should be an option to auto-close these when the SWF is closed or maybe the next session could re-use the same panels, just as with the debugger?

Advanced Datagrid

Another feature only available in the Professional version is the Advanced Datagrid. It offers hierarchical data and basic pivot table functionality, something available on other platforms and really useful in many settings.

The updated pricing

This is a really important change. Flex somewhat competes with Microsoft. Microsoft offers free versions of all their tools, so slashing the price in half ($499 to $249) was a great move. A lower price makes Flex Builder even more accessible and it'll get more people consider it. This may seem unimportant in the western world, but it really matters in some areas. Flex started at the enterprise level and used to cost several thousands of dollars. Being able to upgrade from only $99 will ensure that almost all Flex 2 users make the leap.

Open Flex

This will change things. Microsoft is a huge company with a strong community, but they're closed source. By letting power-users troubleshoot and fix issues, Flex will get an edge and grow bigger faster. It is kind of strange to spend your time fixing a commercial product, but the Flash/Flex community have been doing this for years anyway. Now they have a formal and proper way to do it.

"I would love to change the world, but they won't give me the source code" - Steven Osborn

What's not to like

The integration with other CS3 tools are better, but still thin. Personally, I do find it odd that Flex is still unaware of the Flash class tree. I know I can just add a linked folder to the Flash CS3 classes-folder, but why can't Flex Builder have this in it's class-path by default? For someone using Flex for ActionScript development, it just makes sense that Flash is aware of the basic CS3 components. The new skinning wizards are easy to use, but they are very much a one-way process. If the designer changes the artwork, it's still a manual process to implement this for the developers. I'm really looking forward to Flash 10, Thermo and the demise of the FLA file. That may enable an entirely different workflow between developers and designers that can be fully interactive.

Flex 3 is also not without bugs. There are several things we dislike and we think some of them are connected in some way.

1. Option-clicking method and variable names to jump to the definition is buggy. What's more alarming is that it'll vary from machine to machine, indicating something wrong with the setup/installation.

2. Autocomplete features can disappear at times if code resides in a non-standard location. This is usually resolved by opening a file from this folder and Flex will then all of a sudden remember what it was supposed to do.

3. Mark occurrences is no longer on by default. That's good and it also hides the fact that this function is a little buggy so don't trust it. This is related to the former points where some properties and methods are not detected properly. Too bad. This was working great in Flex 2.

4. Any tool that adds code automatically is a blessing whereas any tool that deletes code automatically is a severe annoyance. Flex 3 tries to be intelligent, but fails at this in some cases with its Organize Imports feature. When using Flex 3 as a code editor for Flash CS3, Flex 3 deletes any references to classes not in it's class-path. Explicit imports will disappear with no warning unless you add a linked folder containing the classes to your project (I've had problems with the "fl.*" classes being deleted).

This also goes for just working in Flex Builder in general. If you delete a reference to a class and it is the only reference to that class, Flex will remove the import. If you just wanted to move some code to a different place in your class, this is mighty annoying. "Oh, I think my code jumped up a little, what import did Flex auto-delete now?"

5. There are some debugging workflow issues. On OSX, the process is less than smooth using both Safari and FireFox.

Conclusion

I've used Flex 3 since the first public beta and I feel it's a great update to an already good product. The transition for users of Flex 2 should be seamless. This may be obvious to outsiders as this is how things is supposed to be. Me, I'm just really happy that I can open any of my Flex Builder 2 applications in Flex Builder 3 without any hiccups. Coming from a Flash background, I'm used to Macromedia/Adobe changing the component structure with every single version of the product, rendering old code useless in a more recent version of the Flash IDE.

Flex 3 is stable and it feels somewhat snappier than Flex 2. It's nowhere as responsive as tools such as FlashDevelop or plain text editors, but it's not shabby for a Java based tool. If you use a more lightweight tool, it'll be a transition anyway and the Eclipse based editor will feel less responsive. After using Eclipse a lot the last year, I know this is just a matter of habit. Eclipse is really powerful and if you use it for a while, you'll not even think about this. If you're new to Eclipse based tools, make sure you investigate the Key Assist menu (Help -> Key Assist). There's a shortcut for most things in Eclipse and you'll write code MUCH faster if you learn just some of these shortcuts.

Flex 2 was largely stable but it had some minor problems. Flex 3 still has the odd crash - the one where the app is just suddenly gone with no errors or anything. Since Flex is all text based, this really isn't a big deal. You'll still want to pimp your development machine with as much RAM as possible. Flex Builder 3 can be a real memory hog and some seemingly simple operations such as opening and closing projects may take a long time if you're low on RAM.

For ActionScript 3 development, Flex Builder still has solid competition from software such as the commercial FDT, Primal Script and Open Source alternative FlashDevelop. For application development based on the Flex SDK, Flex Builder 3 is THE tool. It's stable, full featured and can be extended easily. It can be used both as a RAD prototyping tool for small projects or huge enterprise projects with several developers in many locations. Not having competition is often a bad thing, but the Open Flex alternative where the community can help shape and actively take part will compensate somewhat.

Flex comes in two versions, Standard and Professional. Check this chart to see what version you need. The most notable difference is that Professional adds a nice set of charting components, the advanced datagrid component, allows memory / CPU profiling and supports automated testing.

About Jens C Brynildsen

Jens has been working with Flash since version 3 came out. Since then, he's been an active member of the Flash community. He's created more than a hundred Flash games (thus the name of his blog) but he also creates web/standalone applications, does workshops and other consulting. He loves playing with new technology and he is convinced that the moment you stop learning you die (creatively speaking).
Jens is also the Editor of this website.