MVC Framework for AS3

The Cairngorm framework has proven exception in providing a simple, lightweight methodology for Flex development, but its strength rested on application to database communications. Intense visual development was left without much support, or overuse of the Singleton ModelLocator, creation of ViewManagers and other constucts. PureMVC Diagram

I have been reading up on this framework, Pure MVC, which looks like it offers a complementary approach to Cairngorm for Flex/AS3 development. It’s possible elements of this could be adapted for use in Cairngorm framework implementations, and vice versa, but I’ll need to try it on its own first, and see. It’s definitely worth a look:


5 Responses to MVC Framework for AS3

  1. scott says: was recently released as well. Don’t think it is a replacement for Cairngorm, but looks interesting.

  2. howardscholz says:

    Hey Scott, thanks for the link, I’ll check it out. No, I think the Cairngorm framework is a natural for the problems it solves. Its shortcomings do not put it on a list to be replaced, but rather, places where other design patterns need to come into play. The PureMVC framework, besides being a framework in its own right, also offers implementation details which may possibly be applied as a general pattern to solve some of the view related issues Cairngorm has.

  3. Helen says:

    do you mean pureMVC has all features that cairngorm has ? can u explain in plain text why you choose pureMVC please?

  4. howardscholz says:

    Helen, no, pureMVC does not have all of the features cairngorm has, and I did not mean to suggest that I choose pureMVC over Cairngorm. Some of the “features” of Cairngorm are considered bloat or dead weight by some. And by others these features are critical to the formation of the application.
    The Command Pattern is a good example. In Joshua Kerievsky’s book, Refactoring to Patterns (, he swears by the Command Pattern, and described starting most projects with just that pattern. The Command Pattern is an integral part of the Cairngorm architecture. Part of its strength is it brings most of the business logic to one area of the application, and neatly and consistently documents it. In working with teams, or in negotiating business rules with management or developer leads, this can be extremely helpful. But, it can also seem burdensome, and can be taken to extremes.
    I’ve also seen cases where the Command Pattern has been neutered, or bypassed in order to expedite development. And this is fine where all are in agreement about this, and the benefits offered by the Command Pattern are outweighed by the weight of the code.
    pureMVC offers methods for solving problems that Cairngorm does not effectively address, most notably view handling. I was speaking toward the application of the mediators and the view management that is in pureMVC.
    I view Cairngorm as a collection of design pattern implementations taken directly from the J2EE Pattern Catalog:
    Take a look for yourself and see. This is not to condemn it, no, it is good engineering and the application of “best practice”. More, the mapping of Cairngorm, in my mind, to the J2EE patterns has helped me frame it, and keep an eye open for possibilities for improvements.

  5. howardscholz says:

    A fair analysis comparing the frameworks was done by SilvaFug, the Flex User Group here in the San Jose/Sillycone Valley area:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: