This page is an archive of my old blog. Please visit DavidTucker.net for my current blog.
This site is no longer being maintained and commenting is disabled.

The Current State of Flex Frameworks

At most of the conferences I attend – people come up to me to discuss Cairngorm. Many of them have learned from my tutorials. I am glad that the videos have been helpful to so many (and the daily views still astound me). However, these videos were created by me over two years ago (almost to the day). In reality, a lot has happened in the last two years – and I want to give more insight into my current frameworks choices.

First Generation Flex Frameworks

First, I want to state that the Flex landscape has evolved a great deal in the last two years. In reality, Cairngorm was an attempt to take design patterns from other languages and make them fit well into Flex. For the most part it succeeded, but it didn’t solve all of the problems (and in reality – it created a few more). With that stated, we generally refer to Cairngorm as a first-generation Flex framework.

I could go into further detail here – but, at this point I’ll move ahead.

Second Generation Flex Frameworks

Since then, several frameworks have been created that were written specifically for Flex – and specifically to solve the problems that occur in Flex development. These frameworks were crafted by Flex developers (as opposed to Java developers who started to work in Flex). Because of this, these frameworks solve problems in a way that makes sense for Flex. My two favorite examples of second generation frameworks (and the two I use on projects currently) are Swiz and Mate.

These two frameworks solve problems in different ways, but they both work well. One of my Universal Mind colleagues, Darron Schall, recently posted some slides that give a comparison of the two frameworks. These slides can hopefully assist those of you evaluating these two frameworks so that you can understand the strengths and weaknesses of each option. Darron is also the first person I heard use the first/second generation framework terminology.

How Do I Learn?

Learning a new framework can be daunting (especially if you haven’t worked with a framework before). I think this is reason my Cairngorm videos were so popular. Because of this, I am starting the process of producing a similar video series for Swiz. I am extremely busy – so, I cannot predict when these will be completed. However, I am going to start working on the code examples this week (that is the easy part – the videos and the articles take a good deal of time). That being said – if you have specific items you want me to address – let me know.

I don’t have any plans to develop a video series for Mate yet – but, we’ll see how things go with the Swiz series. One of the reasons I am covering Swiz first – is that the Mate project has great documentation (which makes it easier for new developers to jump into it). The Swiz team is currently working on their documentation – and hopefully this series can be a part of that.

But What About Cairngorm 3?

Undoubtedly, many developers feel that they are expected to migrate to Cairngorm 3 as it is the ‘official’ framework. I would advise against this, mainly because of the architecture it implements. In reality, it is a collection of techniques taken from other frameworks – and yet again, it doesn’t solve all of the problems that Flex developers will encounter.

Development rate and development communities are also extremely important when it comes to a framework. The other established frameworks (such as Mate and Swiz) are further along in development, and have some great plans for the future. Both Mate and Swiz also have vibrant development communities which are eager to assist developers. I think the Adobe Consulting team has shown that Cairngorm development will be slow and official support will be non-existent.

Summary

I want to be clear on one thing – if you (and your team) know Cairngorm, there is no immediate need to stop using Cairngorm. It still serves as a great framework for teams. I would advise teams to NOT work with the new Cairngorm 3 framework (which in reality is just a collection of techniques taken from other frameworks). I would recommend that as your teams investigate new techniques – that you move toward Swiz and Mate (second-generation Flex frameworks).

Additional Frameworks

In reality, these aren’t the only second generation Flex frameworks. I have chosen Mate and Swiz for a specific reason – but, if you want to investigate the other options, you can check out the following frameworks:




27 Responses to “The Current State of Flex Frameworks”

  1. Hey David -

    I was one of those people at MAX that thanked you for the Cairngorm videos ;) I had to shake your hand after your videos completely saved my ass on a project!

    Interesting info about the state of Flex frameworks. Sounds like Swiz and Mate are the ones to watch. Will be avoiding Cairngorm 3 for the time being.

    - rkd

  2. Excellent. However I would kind of put PureMVC in the first gen category and similar to Cairngorm it doesn’t feel like it was designed specifically for Flex development.

  3. Hello David, It was a pleasure meeting you at the Frameworks session at MAX. Here is an article I wrote that sets up criteria for analyzing frameworks: http://imanit.com/blog/?p=80

  4. Borek says:

    Good post. However, the categorization to 1st and 2nd generation frameworks made me thinking if Parsley or Potomac cannot be thought of as kind of 3rd generation frameworks. But that would lead to problems of its own. Let me explain.

    Swiz, for instance, is for most of its parts a great Dependency Injection tool and it also offers a nice and convenient Event Bus (obviously with some other features as well but they are not that essential). We use to call it a framework but it doesn’t force any architecture constraints on us.

    Parsley or Potomac, on the other hand, provide quite a strong guidance, or framework should I say, to the way we should build our apps. If I’m building a screen-based application Potomac provides quite a prescriptive set of tools and components that are supposed to help me. That is quite distinctive from a simple, unobtrusive framework like Swiz.

    So should we call it 3rd generation? But how would be this supposed 3rd gen different from 1st gen? Cairngorm is also highly prescriptive so maybe they are in the same category, Cairngorm just happened to be implemented badly (using “early days style”)? So maybe there is no 3rd gen? Or maybe the 2nd gen “frameworks” shouldn’t really be called frameworks but they do for the lack of a better term?

    As you can see, I certainly did find the post thought-provoking :) Thanks for it!

  5. Tom Sugden says:

    Hi David,

    I agree that the frameworks space is in great shape at the moment. The trend towards inversion-of-control containers is allowing teams to solve the same problems as before in more elegant ways. I actually posted a vaguely similar article to yours recently:

    http://blogs.adobe.com/tomsugden/2009/07/the_trend_towards_inversionofc.html

    Please allow me to correct a few misconceptions about Cairngorm 3, no doubt caused by the incremental naming. Cairngorm 3 is not actually a framework, nor a collection of techniques taken from other frameworks. It’s a higher level resource that aims to provide guidance and best practices for Flex in the enterprise. Included in this are tools and libraries, but the heart of Cairngorm 3 will be a reference architecture and set of best practices that apply across frameworks.

    For example, Cairngorm 3 recommends the use of the Presentation Model as a way of extracting behavior from view components and simplifying unit testing. It recommends dividing larger applications into distinct functional areas, that can be developed, tested and profiled in isolation. And some of the other recommendations are familiar to Cairngorm 2 users, such as encapsulating asynchronous operations inside Command objects and externalizing service definitions from the view, a la the Service Locator.

    We still have a lot of work to do on the Adobe Open Source site, but we hope the end result will be constructive and helpful for developers, while increasing the adoption of Flex in the enterprise. We welcome feedback from practitioners and creators of frameworks.

    Best Regards,
    Tom

  6. Darren says:

    I’m still struggling to see the point of this article. The first point seems to be “Cairngorm is old, try something newer”. That seems reasonable on the surface but without at least a brief explanation of what the problems with Cairngorm are, all you seem to be saying is “trust me, I’m right”. The second part seems to be saying, “use Mate or Swiz”. Again, no explanation. For example, why is Swiz a better framework than Parsley?

  7. Alex Uhlmann says:

    Hi David,

    Instead competing with other frameworks or only recommending single frameworks and no others, our goal is to take a step back and explain underlying motivations that are intended to help developers to apply their framework of choice in a useful way. But more importantly, our goal is to add value to the community with creating a larger picture of what we found crucial in developing enterprise Flex/AIR RIAs.

    We’re very much looking forward to any critical but constructive feedback. Christphe Herreman summarised some great points on this topic as well here:

    http://www.herrodius.com/blog/216

    Please keep it coming, we’re listening and doing our best to solve it!

  8. David Tucker says:

    @Borek – Great points! In reality, I think how prescriptive a framework is – is really a choice of the framework creators (and not necessarily something that puts it in a new generation). For example, Mate is more prescriptive than Swiz. In reality, it is just another variable a developer can use when choosing what framework will work for them.

  9. David Tucker says:

    @Darren – The great thing is that I have provided links to the resources that allow you to investigate what framework will work best for you. In reality – I tried to not get into too many of the specifics in this article. This was mainly for those people who have used my Cairngorm tutorials – and just wanted advice on where to look next. Ideally, everyone will go through an evaluation process to pick their next framework.

  10. Jethro says:

    Personally I feel Cairngorm 3 is taking a very different approach this time and think its a good direction.
    Rather than being a boxed framework, it looks like a collection of de-coupled libraries and documentation on best-practice.
    In fact it even builds upon (or provides extensions to) other frameworks.
    I have two criticisms though of this new direction, 1) Cairngorm <3 has always been useful in teams of varying skill-set as it enforces a strict code layout and structure. This will be lost to the greater part with v3 as far as I can tell. And 2) perhaps a name change would have been appropriate as v3 is so different in so many ways.

  11. Keith Craigo says:

    David,
    First! thank you for your tutorials on Cairngorm they were and continue to be a great resource.

    Personally I’m not against the direction Cairngorm 3 is going, I think there are some valid reasons for moving to an architecture rather than just a single framework. But for a lot of applications this will be overkill. Even Cairngorm 2 is overkill at times. The use of frameworks for me depends on the application, sometimes just the Flex framework is the appropriate choice.

    I’m looking forward to your Swiz tutorials.

    Thank you
    Keith

  12. Looking forward to your Swiz tutorials

  13. [...] zum Artikel von David Tucker. Link zum  Artikel Truckin´ Through ActionScript 3.0 MVC: Part I Link zum  Artikel Truckin´ [...]

  14. iTi says:

    Hi,

    need to update the Robotlegs site ( http://www.robotlegs.org/ ) in Additional Frameworks section :-) )

  15. Don McBride says:

    I’m just coming up to speed with Cairngorm after writing many very complex projects using multicore PureMVC. I perceive much of this discussion as if PureMVC is getting dissed for some reason.

    I think frameworks are analogous to what Bible version you might read. I once asked a Pastor what’s the best version of the Bible to read. He said, the one you read. So, the best framework is the one you are using. ;)

  16. Sid Maestre says:

    Hey David,

    Thanks for the tutorials, I used them to get a handle on Cairngorm.

    Anyone attending 360Flex San Jose in March 2009, can attend a Sunday (day zero) beginner Mate Framework workshop. I’m putting this together and the folks at ASFusion (who created Mate) have agreed to review my materials to ensure I’m promoting best practices.

    http://www.360flex.com/

  17. sminrana says:

    Hi

    you guys are so confusing, anyone read those articles can be very confused, can anyone simplify that what framework, i need to use for big and medium flex project, which will be best in the industry.

    seems like fighting between programmers around the world.

    Smin Rana

  18. [...] was not a pain. Maybe a flex 4 app for this sort of site is an overkill, but i am guessing that the 3rd generation of Flex frameworks might not be focused on MVC and data/event driven architectures, but more geared towards visual and [...]

  19. Josef Salyer says:

    You should also check out Sean Hess’s Glue: http://github.com/seanhess/glue

  20. S. Bobeety says:

    Hey, what do you think of restfulx?

  21. CairngormLearner says:

    I appreciate the videos you made, David, so thank you.

    Using Coldfusion on your fourth video convolutes the subject though, wish you hadn’t used that as a good part of the video was spent explaining CF-related setup.

    Just providing feedback.

  22. [...] The Current State of Flex Frameworks Categories: Adobe, Cairngorm, Cairngorm Architecture, Frameworks, Google, Mate, Swiz, flex, [...]

  23. [...] the rest here: The Current State of Flex Frameworks Categories: Adobe, Cairngorm, Cairngorm Architecture, Frameworks, Google, Mate, Swiz, flex, [...]

  24. [...] after reading David Tuckers blog (in which he has great cairngorm tutorials here ), he explained here that a lot has happened with flex frameworks since he created the cairngorm videos. So I think [...]

  25. Sudhakar Reddy says:

    Hi guys

    I am so confused, can anyone simplify that what framework, i need to use for medium flex project, which will be the best i am very new to this frameworks stuff.

    Thank You
    Sudhakar Reddy

  26. [...] was not a pain. Maybe a flex 4 app for this sort of site is an overkill, but i am guessing that the 3rd generation of Flex frameworks might not be focused on MVC and data/event driven architectures, but more geared towards visual and [...]