Why Swiz might replace Cairngorm

Submitted by Falken on

Like a lot of people, I started off using the Adobe-sourced Cairngorm application framework for Flex applications, but there are several areas of pain with it - and they can't really be addressed within Cairngorm itself.
This has lead to an explosion in second generation Flex frameworks, of which I've looked so far at ModelGlue:Flex and Swiz.

MG:F was clearly fairly immature, and a lot about it was unfamiliar (having used Fusebox server-side in the past, ModelGlue is totally different). Flex-specific documentation was also lacking. It did solve a number of problems Cairngorm had, such as greatly reducing the number of classes that needed to be created. However the single giant file that wired Events to Controllers felt over engineered for what I needed.

Swiz I found to be pleasant change. We all ready use dependency injection and inversion of control on the server side (using the ColdFusion version of Spring, ColdSpring) so it feels very natural to have model's injected into views.
I also liked the 'no classes or configuration' approach to events that uses DynamicEvent classes and 'Mediate' meta data to connect things together automatically.
Likewise, the Controllers have the services and models they need injected into them, which simplifies things a lot (bye bye ModelLocator.getInstance() !).
Like MG:F it also provides helper methods for invoking RemoteObject's ( executeServiceCall() ) that abstract away the token handling etc.
The documentation both on the Google Code site and swizframework.org is also excellent - I was able to get up and running in no time.


How about Mate? It's on the least obtrusive side of the spectrum, very lightweight and leverages things like the Flex event model and dependency injection. Has been getting a lot of favorable reviews in the community, too.

I'm in the process of evaluating Mate and Swiz. There is a lot to like about Mate too.

Tony Hillerson's write-up on all of these on InsideRIA is really great.