Selecting the Right Flex Application Framework

0 comments | 624 views

So you’ve decided to use Flex for your web application development. It’s easy to follow the online tutorials and prototype an application, but deciding on an application framework for your major production Flex application is more difficult. The Flex community is divided between Adobe’s Cairngorm and Cliff Hall’s PureMVC, with strong arguments from both sides. However, your answer may just lie in the “it depends” space.

This post aims to help you make that decision. It includes analysis of Cairngorm, PureMVC, and the new kid on the block, asfusion’s Mate.

Cairngorm

Cairngorm (pronounced \kern-gorm\) is a lightweight micro-architecture for Rich Internet Applications for Flex or AIR applications. It is not only a framework, but also an approach to organizing and packaging code, components, and a method to achieve separation of concerns (i.e. model-view-controller).

Compared to other frameworks, Cairngorm requires the most components, but it is the most straightforward.

Cairngorm Framework
Figure 1 Cairngorm Framework


Pros Cons
  • Advocated by Adobe Consulting and is part of the Adobe Engagement Platform.
  • Broadest adoption for a Flex MVC framework, making it the de facto standard for Flex developers
  • Well-documented with great tutorials.
  • Designed expressly for Flex and thus, takes advantage of Flex features.
  • Simple, straightforward MVC framework
  • Tightly couples the MVC layers.
  • Components can either be too large or too many, resulting in the application becoming too unwieldy from the development and maintenance perspective.

Tips and Tricks

Recommended When:

PureMVC

PureMVC is also a lightweight framework for creating applications based on the classic MVC concept. PureMVC is not specific to Adobe Flex and is being ported to other languages. Many Flex developers consider the framework to be the best Flex framework out there, but accept that it does not take advantage of Flex features.

PureMVC Framework
Figure 2 PureMVC Framework


Pros Cons
  • Provides flexibility to easily support complex workflows, e.g. command chaining.
  • Promotes code reuse.
  • Cleaner architecture and implementation, i.e. layers are more loosely coupled.
  • Well-documented, but not many tutorials.
  • Not designed expressly for Flex, and thus, has been criticized for not taking advantage of basic Flex features, such as data binding.

Tips and Tricks

Recommended When:

Mate

Mate (pronounced \mah-teh\) is the newest Flex application framework. It is also designed expressly for Flex. Its main differentiator from Cairngorm is that it uses dependency injection to hook the event handlers to controller entities and view properties to the data model (via injectors). Thus, it requires the least number of components of all of the frameworks.

Mate Framework
Figure 3 Mate Framework


Pros Cons
  • Provides flexibility to easily support complex workflows, e.g. method invoker chaining.
  • View can be simple and uncluttered, i.e. injectors can enable the view to not even reference Mate components, except for within the application MXML.
  • Promotes code reuse, e.g. invoked or referenced custom entities do not need to extend any base classes or interfaces.
  • Well-documented, including tutorials, examples and best practices.
  • Nullifies the power of AS3 compile-time type checking with the EventMap MXML.

Tips and Tricks

Recommended When:

Others

source: http://www.summa-tech.com/blog/2009/01/14/selecting-the-right-flex-application-framework/

StumbleIt!
Comments

No comments yet.

Leave a comment

(required)

(required)


Spam protection by WP Captcha-Free