Some Resources for Learning Adobe Flex William Mitchell whm@MitchellSoftwareEngineering.com Last update: Wed Oct 08 22:14:37 2008 Books ----- When just starting up the Flex learning curve, I worked through a number of chapters in "Adobe Flex 3: Training from the Source" by Tapper et al., and found that to be very useful. Another book that I used quite a bit when starting out was "Flex Solutions" by Casario. It covers a lot of material but it's very step-by-step, and while I once appreciated all the detail, it now seems to have a lot of clutter. "Programming Flex 2" by Kazoun and Lott is perhaps the Flex book I most regularly reference. It does a good job of concisely describing key points and in a number of places goes into depth I haven't found with other Flex book. The index is terrible--I usually thumb through the table of contents or search it on Safari. There's a new edition out, "Programming Flex 3", but I haven't upgraded my hardcopy yet. "Flexible Rails" by Armstrong is about using Flex 3 with Ruby on Rails, but I think it's got enough good stuff about Flex itself, and Flex-related web application architectural issues, to make it worthwhile, even if you have no interest in Rails. I've got an "early access" copy of "Flex 3 in Action" by Ahmed et al. It has some rough spots, which are to be expected, but I've found a fair amount of material in it that I've seen covered nowhere else. "Developing Rich Clients with Macromedia Flex" by Webster and McLeod is a book based on an earlier version of Flex, maybe 1.0, and ActionScript 2.0, but a lot of the material, especially the conceptual stuff, is still as good as the day it was written, and the writers bring a lot of real-world experience to the table. Cairngorm seemed murky to me until I read "Flex Technical Architecture" in chapter 20, which, interestingly, predates Cairngorm! This book is truly a gem that's slipping into the sands of time. Something I'd like to find but haven't is a Flex book that really goes deep. There are dozens of books on Flex that all cover roughly the same set of basics, some much better than others, but I'd like a book that assumes the reader knows all the basics and starts there. There are some places of real depth in "Programming Flex 2", like the "Component Life Cycle" section, but I'd like to see a whole book at that level. It seems that there's one clear bookshelf-must for ActionScript 3.0, and that's "Essential ActionScript 3.0" by Moock. Adobe Documentation ------------------- Something I'd love but have never found is a full enumeration of all the Adobe documentation on Flex. One thing that seems to come pretty close is http://livedocs.adobe.com/flex/3/flex3_documentation.zip-- a bunch of PDFs and "language reference" (API docs, I'd say) information as tree of HTML files. Again and again I've found "Adobe Flex 3 Developer Guide", devguide_flex3.pdf, in that zip, to have the best explanation of whatever I'm trying to understand. IF I COULD CITE ONLY ONE RESOURCE FOR FLEX, THIS PDF WOULD BE IT. Much of what's in that zip is available as HTML at http://livedocs.adobe.com/flex/3/html/ FWIW, here's the correspondence between PDFs in the zip and sections below the above URL: devguide_flex3.pdf: Flex Programming Elements, User Interfaces, Advanced Flex Programming, and Data Access and Interconnectivity build_deploy_flex3.pdf: Application Design, Application Development, Application Deployment createcomps_flex3.pdf: Custom Component Development, MXML Custom Components, ActionScript Custom Components, Nonvisual Custom Components datavis_flex3.pdf: Flex Data Visualization Developer's Guide using_fb_flex3.pdf: Using Flex Builder 3 dev_guide_flex_air1.pdf: Developing AIR applications with Flex progAS_flex3.pdf: Programming ActionScript 3.0 The content in compilerAPI_flex3.pdf, flash_component_kit_flex3.pdf, skinning_extensions_flex3.pdf, and testing_with_QTP_flex3.pdf doesn't seem to be present at the above URL (http://livedocs.adobe.com/flex/3/html). I've found browsing the "Language Reference" at livedocs to be tedious and slow. At the end of this document is a script, flexref, that I use to search a local copy of the documentation by class name or fragment thereof. Here's an example of use: % flexref array 1) ./Array.html 2) ./flash/utils/ByteArray.html 3) ./mx/collections/ArrayCollection.html 4) ./mx/core/ByteArrayAsset.html 5) ./mx/utils/ArrayUtil.html #? 5 [Brings up ArrayUtil doc] You'll have to hack on the script a little bit to make it work for you. Communities ----------- http://tech.groups.yahoo.com/group/flexcoders/ is pretty good, but it's about 100 messages per day, most of the form "How can I make [something] work right?". The Adobe Flex forum, http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=60&catid=585&entercat=y is also a read-only Google group: http://groups.google.com/group/macromedia.flex.general_discussion/topics http://www.actionscript.org/forums/ has ActionScript 3.0 and Flex 2/3 forums, among others. The #flex IRC channels on Freenode and EFNet are pretty good -- I've gotten quick, correct answers for a number of questions there. The Flash and Flex communities have a common interest in ActionScript 3, so Flash groups are also a source of AS3 expertise, albeit with lots of noise about Flash authoring, etc. On Google there's http://groups.google.com/group/macromedia.flash.actionscript/topics, also a read-only mirror of an Adobe forum. http://chattyfig.figleaf.com/mailman/listinfo/flashcoders is a very active mailing list, but as the name implies, it's Flash-, not Flex-centric. I can't seem to find time to follow many blogs but a few I've made note of are these: http://blog.iconara.net/about/ http://blogs.adobe.com/aharui/ -- Alex Harui http://raghuonflex.wordpress.com -- Adobe Flex team member http://weblogs.macromedia.com/pmartin/ Peter Martin, EMEA Consulting group, stuff on continuous integration and testing Issue 9907 of Flexcoders has a BIG list of blogs. Tools and Libraries that I make regular use of ---------------------------------------------- FlexUnit -- http://code.google.com/p/as3flexunitlib xUnit for Flex, for TDD Flex-Spy http://code.google.com/p/fxspy/ "Flex-Spy allow you to inspect and dynamically change most properties and styles of the visual components in your Flex application. You can - for example - try out a specific width or a background color for your component before changing it in your code." -- from the site Incredibly easy to drop in and use: (1) Add the .swc (2) Add an import: import com.flexspy.FlexSpy; (3) Stick in some way to fire it off. I usually park a button somewhere: http://code.google.com/p/as3corelib -- ActionScript 3.0 library for several basic utilities. FlashTracer https://addons.mozilla.org/en-US/firefox/addon/3469 http://www.jeffryhouser.com/index.cfm/2007/12/4/Connecting-Flex-3-to-a-running-Debugger-session Describes how to attach Eclipse/Flex Builder and debug an already-running swf. One loose end ------------- I believe my path to enlightenment with Flex started with realizing that a file like x.mxml that looks like this, ... is turned into ActionScript that looks like this: 'class x extends TitleWindow ...'. The compiler flag -keep-generated-actionscript, which causes the generated ActionScript files to be left in place, provides the opportunity to understand the mapping from MXML to ActionScript. Source for flexref script (mentioned above) ------------------------- #!/bin/bash # # Note: I've unloaded http://livedocs.adobe.com/flex/3/flex3_documentation.zip into # cd /g/lib/books/adobe/CompleteFlex3Doc. Adjust your paths accordingly. # # To regenerate: (cd /g/lib/books/adobe/CompleteFlex3Doc/langref; find -iname "*.html" | grep -v index > ../langref.files) # cd /g/lib/books/adobe/CompleteFlex3Doc/langref if [ $# -ne 0 ] then s=$1 else echo -n 'String to search for? ' read s fi while true do if hits=$(grep -i -e $s ../langref.files) then select page in $hits do if [ -z $page ] then break fi open $page # With Cygwin, this is my open script: file=$(cygpath -w "$1"); cmd /c "$file" & done s=$REPLY else echo -n 'No matches. String to search for? ' read s fi done