Monday, May 11, 2009

PureMVC vs Cairngorm framework comparison

Reasons to use PureMVC over Cairngorm.

#1 IMO if your gonna use Cairngorm your better off just going ahead and skipping every framework concept and just making classes with static (global) variables. That's what it feels like to me anyway lol.

#2 Makes it too easy for you to be sloppy. Accessing your model locator everywhere in your app can get ugly fast. PureMVC has a very structured but flexible way to code. Once you get comfortable with PureMVC, you will be able to get up to speed in other projects coded with PureMVC much quicker than Cairngorm coded projects.

#3 If your just starting to try to learn Cairngorm and find it confusing, it's cause you can't make sense of something that doesn't make sense!

#4 It's difficult to make a modular program in Cairngorm. Since the controller/models are singletons only one instance can exist (thus only one instance of the application). There are ways to get it to work, but you're gonna have to think outside the box for that..
PureMVC Multicore provides a framework for creating modular applications right out of the box.

#5 PureMVC utilities. The PureMVC community has added more capabilities on top of the PureMVC framework such as Undo/Redo (works great BTW), Pipes, etc.

#6 Scalability. It just gets way too messy trying to make a complex Cairngorm application. It can especially happen if you're just beginning at it or have been coding lazily. Because coding in PureMVC is much more structured, you won't be held back in the late game.

#7 PureMVC is fun to program in. Cairngorm is a nightmare :P

#8 Views can actually be reused in PureMVC. It's hard to do this in Cairngorm with all the views accessing directly to the global variables in the models. The reason PureMVC can decouple the view from the model is it has something called Mediators which take care of displaying and interaction in the views.

#9 Cairngorm is Adobe's official framework, and Adobe has been pissing me off lately with all the bugs I keep running into :P

p.s. Sorry for the long rant :P

1 comment:

darscan said...

If you enjoy PureMVC you might be interested in RobotLegs AS3 - a little framework, very much like PureMVC, that uses Dependency Injection to get rid of all the casting you have to do with PureMVC. There's a demo you can check out here:

RobotLegs AS3 Demo