Cairngorm is an MVC open source framework currently supported by Adobe. This framework is basically a dead project. Last release: 2.2.1 on May 30th, 2007, and only pre-talk about the need and features of an unlikely v3.0. I've used Cairngorm before and immediately didn't like it, but I decided to take an in-depth look at it because it seems development teams are still using it, and I might need to know it.
What's its benefit?
Well, Cairngorm restricts how a developer can interact with data, business layer, and view objects. And the restriction isn't even from the framework: it's just the honor system. But this agreed upon way to get services and execute a sequence of operations ("commands") would help get a mid-to-large inexperienced development team more organized. This pattern would help limit developers exploring new and different ways of doing the same thing.
Drawbacks?
Many. Whoever wrote this really wanted to use as many patterns as possible. One that really bothered me was the use of marker interfaces, namely IModelLocator and IValueObject, to add metadata to classes, yet nothing in the framework uses that metadata! This framework can serve as a crutch to those that don't want to dive into what Flex allows you to do, and this can lead to a popular anti-pattern "the golden hammer": when you only know how to use a hammer everything looks like a nail.
Flex is an event-driven programming environment with tremendous possibilities, and I'm not a fan of Cairngorm trying to limit it so people don't end up writing unmaintainable code.
As I expected, I wasn't the first to have this reaction to Cairngorm. So here is a great post I found after writing my post.
http://blog.iconara.net/2008/04/13/architectural-atrocities-part-x-cairngorms-model-locator-pattern/
Subscribe to:
Post Comments (Atom)
1 comment:
Total agreement from me. Cairngorm looked like a "pattern hammer" to me too from the start. I only got to mess with it for like 2 weeks, and I hated it's boiler-plate copy&paste programming model.
Have you looked at PureMVC at all? What do you think of it? I don't know dick about it, never looked at it :P
Post a Comment