I just wanted to share my thoughts about the frameworks in the Flex environment. You may have noticed that I am in love with Spring when I write Java code, but how about Flex? For a simple example application I go with KISS (keep it stupid simple) approach, but for serious data driven app I utilize a framework.
How to choose a framework that works for You
Firs of all you need to know what you are looking for, because if you do not know where you are going, any path will take you there. When I first started to p[lay with Flex about 3 years ago, I noticed that I need to add some structure to the application. Since I was already using Spring I started looking for a framework. At that point in time there where only two alternatives worth looking at: Cairngorm (heavily pushed by Adobe) and PureMVC.
To select a framework I used both framework to build a simple sample application. After spending a day on the exercise I chose PureMVC. PureMVC solution was cleaner, it suited my need better and I felt that it did a better job at structuring the application. I stuck with PureMVC fro quite a while, Until couple month ago I decided to take a look of something better came along.
All the hype was around this English word “Mate”, meaning friend or buddy. Even some developers around me have deep religious belief that Mate will save the world. So I had to take a deeper look at this framework. I build a simple application to get a feel for the framework and found that I do not like quite a lot of things about Mate.
First of all everything is done in the sudo code called MXML. I like writing code, I like to have control and make things exactly like they should be and generated code not allays works exactly like I need it to. Then I started looking into some other aspects of the Mate framework and found a better solution. If you are interested in a deeper reading about what I do not like about mate here are couple posts from Shaun that I agree with:
After looking around I chose to use Robotlegs Framework. It gave me exactly what I needed: dependency injection, mediators and proxies. What you need for your application may be completely different and you may choose another framework, but give robotlegs a good look over to see if it will fit your need too.
Select a framework with a particular need in mind, don’t just use one because Adobe pushed it or your mate recommended it. Understand framewrok’s pros and cons and choose the one that give you the most bang per line of code or xml if that is your coding flavor.
Let me know in the comments which other framework you have used and would recommend to others.