Supplemental files and examples for this book can be found at http://examples.oreilly.com/9780596516215/. Please use a standard desktop web browser to access these files, as they may not be accessible from all ereader devices.
All code files or examples referenced in the book will be available online. For physical books that ship with an accompanying disc, whenever possible, weve posted all CD/DVD content. Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to .
I remember 2004. That was the year the Olympics were held in Greece. Oil rose above $50 per barrel. The Return of the King swept the Oscars. The Red Sox won the World Series. The Serendib Scops Owl was discovered in Sri Lanka... What a year! Okay, that last one I ripped off from Wikipedia. But 2004 was a big year for those owls... and it was also a big year for Internet applications. It was the year Flex was born.
A lot has changed in just a few short years. Flex 1 was very exclusive and its applications were tied to a server. It required expensive licenses and few resources were available to help you out. Flex 1.5 cut the cord between the application and the server. Suddenly, anyone could write and deploy a killer Flex app, but most folks still had not heard of Flex. When Flex 2 came out, it was really making some headway into the mindshare of rich Internet application (RIA) developers, even as the industry struggled to define what a RIA developer was. Flex got more and more press, and the SDK was finally released for free. By the time the 2.0.1 update shipped, Flex had an impressive following of designers, developers, so-called devigners , and that rarest of beasts, the Serendib developer.
And now comes Flex 3, the most complete and usable version of Flex yet. You get a profiler, OLAP, CS3 integration, refactoring, framework RSLs, deep linking, an AJAX bridge, code generation for servers, automation, just about everything you could dream of. And if something isnt in the box, you can bet someone in the community is working on it: frameworks, 3D libraries, maps, mashups, configurators, dashboards, monitors, widgets, you name it.
But with all those new features and functionality, whats the biggest change in Flex 3?
Well, its not a new feature, or a refactored API. Its not the splashy new box cover, and its not the low, low price. Its not even that snazzy new Getting Started Experience. No, its none of these things. To see the biggest change in Flex 3, to really see it, you need to stand up, walk down the hall, step into the bathroom (after knocking politely, of course), and look in the mirror. The biggest change in Flex 3 is you . Thats right. With Flex 3, you, I, or anyone else can contribute to the open source Flex SDK. You can stick your hand into the belly of the beast, tweak its spleen, sew it up, and reawaken a whole new beast. With just a text editor and an Internet connection, you can become a contributor on this leading RIA technology.
So, where does this book fit in? Looking at the existing Flex 3 product documentation, I see more than 2,300 pages of content and nearly 1,200 example applications. I even wrote a couple of those, although if you corner me with a compiler error, Ill deny it. And that doesnt even include the Language Reference, with thousands more virtual pages of developer doc. So, why do we need a book about Flex 3 if so much content is already available?
Well, when they wrote Programming Flex 2 , the first edition of this book, Chafic and Joey learned how to use Flex 2 from the outside in. This was before the source code was even available to look at. They managed to figure out how to do such things as work with remote data, navigate the complexities of the Flex layout schemes, and create incredible custom components. They were real developers solving real problems and writing real code. I remember looking at many of the topics in that edition and saying to myself, I wish I had written that. These guys took incredibly complex topics and distilled them into the information you needed.
For this edition, Chafic and Joey looked at the product from the inside out. They peeled back the skin and saw the sinewy skeleton of a dynamic framework that will define the next generation of web apps. If youre designing a video player, theres a chapter for you. If youve got a yen for currency formatters, this book has you covered. If you just want to get a handle on the application life cycle, you came to the right place.
So, this book will tell you what Flex 3 is. And after you read it, you might discover something that Flex 3 isnt. But now theres something you can do about it. At some late hour, when everyone else is asleep, if the inspiration strikes you, you might screw up your courage and heap on the moxie, and put your mark on the Flex world by joining the forces at http://opensource.adobe.com/flex. This book is just the beginning.
Preface
It literally took us several years to write Programming Flex 2 , the predecessor to this book. We worked hard on that book, and when it was finally written and edited and proofread and off to the printer we sighed and looked forward to a break from writing about Flex. However, Flex 3 followed close on the heels of Flex 2, and as the saying goes, theres no rest for the weary. We again picked up our keyboards and started updating the book for Flex 3. The result is what you have in your hands. And it is more than a simple update.
We thought Programming Flex 2 was one of the best books available for Flex 2. However, we knew we could do better. There were topics we just didnt have time to include in that book. With Programming Flex 3 we wanted to not only update the book for Flex 3, but also expand our coverage to include things that werent in the first book. We think we achieved that goal.
The most notable additions to Programming Flex 3 are in contains the synthesis of everything else we discuss throughout the book. This is the one addition we think is perhaps the most important, since it helps explain how to take everything youve learned about Flex in preceding chapters and use that knowledge to build a real-world application.