Learning Flex

After about two years of threatening to learn Flex I'm finally doing it. I started by completing the "Adobe Flex 2 Rich Internet Applications" DVD-ROM course from Total Training. I won this a while ago at a CFUG meeting and have been meaning to get to it ever since. I have to admit, I wasn't sure how I'd like the format given that I usually learn by reading a book on a particular topic then experimenting, but I liked the course. And I know what your thinking, "Flex 2?," but from what I can tell the basics of Flex haven't changed much from Flex 2 to Flex 3, so I found the course very helpful. I'd even recommend it to someone looking to learn the basics of Flex in a hurry.

Next up I decided to tackle Cairngorm. Adobe has a series of articles on this "Microarchitecture" but if you really want to get a handle on Cairngorm I recommend David Tucker's series of tutorials. Again these include code along videos which really help you understand the Cairngorm event flow.

First Impressions


Flash has come a long way since I last tried to use it to build an application. (Anyone remember Flash UI Components?) Overall I'm liking the Flex framework, although it does have it quirks. The class library is huge, but FlexBuilder helps with that a bit. Speaking of FlexBuilder, it is fantastic. Why can't Adobe build a similar IDE for ColdFusion?


My initial impressions of AS3 are mixed. I've done a little AS2 development, but by and large most of my ActionScript experience has been with AS1 using the OO techniques laid out in Robert Penner's Programming Flash MX. More recently I've been doing a lot of JavaScript development so I've seen just how expressive a dynamic, prototype-based language can be. Given my past experience with AS1/2 and my current experience with JavaScript, the strictly-typed, class-based AS3 just feels clunky. Maybe I just need a little more time to get used to the new language and run into some of the problems it attempts to solve.


It took me a few days to wrap my head around Cairngorm, which to me means it is too complex, but I figured I couldn't really call myself a Flex developer unless I learned to use it. Once I understood the whole Event-Command-Delegate chain it all started to make sense, but I still think it is a bit much. Cairngorm is also missing a few things I really have come to rely on in my framework stack like IOC and AOP capabilities. I do really like the ModelLocator pattern though, and breaking you application out into view components just makes sense. At the end of the day I think using Cairngorm may be slightly better than using no framework in that everything has a place; unfortunately that means you have to open three different classes to see how any one event is handled.

Now that I have a handle on Caringrom I'll be looking into Mate and Swiz to see what they have to offer.

... So begins my Flex learning adventure. Expect to see more Flex content in the near future.

Phil Duba's Gravatar So can I now finally see some commission from that user group meeting, :)
# Posted By Phil Duba | 5/13/08 1:45 PM
Josh Tynjala's Gravatar Check out the PureMVC framework. It made a lot more sense to me than Cairngorm.
# Posted By Josh Tynjala | 5/13/08 5:37 PM
Johan's Gravatar I foudn the TT CD a good intro and the Flex "Training from the Source" book even better - there is a new edition for Flex 3.

As far as frameworks I have gone with EasyMVC from Tom Bray which has some of the nice bits from Cairngorm (modelLocator, commands) but is as the name implies easy to get your head around. Nice series of atricle here: http://clockobj.co.uk/2007/10/17/simplified-cairng...
# Posted By Johan | 5/13/08 7:46 PM
Nathan Mische's Gravatar Thanks for the additional framework suggestions.

@Josh - I had heard of PureMVC but thought it was geared more toward pure ActionScript development rather than Flex. I'll have to give it a look.

@ Johan - Is this the same EasyMVC that was released by Simeon Bateman?
# Posted By Nathan Mische | 5/13/08 9:18 PM
Chris Bartling's Gravatar Look at the Prana Framework for IoC/DI facilities. I have successfully used in with Cairngorm. Information about it at http://www.pranaframework.org/.
# Posted By Chris Bartling | 5/19/08 3:50 PM
Nathan Mische's Gravatar @Chris - Thanks for pointing me to Prana, it looks very interesting. I particularly like the ability to configure Cairngorm command sequences. Something about hard coding the nextEvent in a SequenceCommand just didn't smell right to me.
# Posted By Nathan Mische | 5/19/08 9:54 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.