Dave Carabetta Blog Banner


October 16, 2007

A Very Important Change From Flex Builder 2 To Flex Builder 3


This has come up several times on the flexcoders mailing list and since it's such an important change, I thought I would post it to help make sure it doesn't get missed.

With the release of Flex Builder 3 Beta 2 on Adobe Labs, when you now compile your application, Flex Builder only generates a debug version of the SWF by default. However, and this is the part that is tripping people up, there is no -debug suffix on the generated SWF file, so it will be named as if it were the release version. The big difference is that the file size will be much larger. This last point has raised a red flag with some developers, who mistakenly believe that the latest beta actually increases the file size of the release version of their application.

Why did Adobe do this? Well, if you've built a good size Flex application, you'll have likely noticed that the compilation time grows dramatically to the point where you can sometimes literally go and get some coffee in the time that it takes to compile your application. Seriously. This is (partly) because, prior to Flex Builder 3 Beta 2, both a release version and a debug version of the application were being generated in the output directory, so you were waiting roughly twice the amount of time for Flex Builder to do its job (OK, the delay is not quite that linear, but you get the point). Further, if you're using the Modules feature, you had to write some hack-ish runtime code to determine which SWF file to use between development and production. But when you're developing your application, you usually don't care about the release version of the SWF, right? Well, to reduce this "wait time," only the debug version of the SWF is created, and since the file name will always remain the same, your hack-ish runtime code is no longer needed.

OK, so this is great while you're developing, but what happens when you're ready to release your application and really do want the release version of the SWF? Well, the latest beta introduced the Export Release Wizard. Found in the Project menu, this handy wizard will create the release version of your application in a bin-release directory by default. It is in this new output directory that you will find a clean, compressed version of your application all ready to deploy to your production environment.

Mike Morearty and Tim Buntel of Adobe give excellent explanations of this change and I encourage you to take a look at their posts if you would like more information. It's a change that makes sense, but if you're a long-time Flex developer, then it's definitely going to take some time to get used to remembering it.



Related Blog Entries

Comments
David Hamiter's Gravatar Nice post, Dave. Thanks.
# Posted By David Hamiter on 10/16/07 at 12:00 PM
Volodymyr's Gravatar But size swf in bin-release is larger that swf that was compile at Flex Builder 3 beta 1
# Posted By Volodymyr on 10/31/07 at 10:13 AM
Susan's Gravatar Thanks Dave, this text was useful for me.
# Posted By Susan on 6/27/08 at 9:50 AM

© Dave Carabetta, 2005-2008. This blog licensed under the Creative Commons License. Some rights reserved. This is a personal weblog. The opinions expressed here represent my own and not those of my employer. Blog software provided by Raymond Camden.