BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

GEMVC ActionScript Framework used in Altair Lunar Lander

| by Moxie Zhang on Dec 03, 2008. Estimated reading time: 2 minutes |

The GEMVC ActionScript framework is used for developing Flex applications in Johnson Space Center's Altair Lunar Lander project. Christopher Dean, the solution architect who created GEMVC, is also the chief scientist for the extensible information model (XIM) program for the Altair Lunar Lander project. InfoQ spoke with Dean to learn more about GEMVC.

According to Dean, GEMVC is a set of ActionScript classes that support a model-view-controller pattern (MVC). It is not a full-blown framework, because you can pick and choose which parts you want to use. It is composed of a model, a controller framework, and a service/gateway layer. The views are the Flex MXML files themselves.

When asked why he didn’t use one of the already available frameworks, Dean answers:

I initially looked at Cairngorm by Adobe Labs after I had already created my own service layer. I didn't really want to have to change it, because I liked how it worked and decided to make an MVC framework around it. Furthermore, I didn't like the way Cairngorm had only one main controller and everything was accessed through singletons, allowing only one model and one controller. I like to modularize my code, so I allow separate controllers for different parts of the application. Each Flex component could theoretically have its own controller. In the end, this is just a question of style.

Dean explains the major difference between GEMVC and the well established frameworks like Cairngorm:

The framework GEMVC uses Flex's dispatch mechanism instead of its own. I like this, because it allows a hybrid approach to executing events. In Cairngorm, all changes must be made via the model. This is fine in most cases. However, there are cases where you want to control the application as a result of an event and this may even involve calling ActionScript methods on existing components. With GEMVC you can do it easily without having to know the full dot path (which is brittle) to a component. You only need to know the identification of the component that handles the event.

Dean says that, in addition to the Altair Lunar Lander program mentioned above, GEMVC is being used in the Stardust project for the Astromaterials Research and Exploration Science Directorate. The program manages all the samples coming back from the Stardust probe.

With respect to the future, Dean says:

There have been some ideas bashed around on the riaforge blog about possible future uses, but I can say for a fact that there are three things coming soon for GEMVC.

  1. Support for Producer and Consumer functions in the service layer. This is already complete and the distribution will be updated any day now
  1. Support for using MXML tags to specify controllers in MXML files instead of a separate ActionScript file. This is a style issue, since some people are more comfortable with MXML than ActionScript
  1. Improvement of hierarchical controllers. Currently there is no way for a component controller to process part of an event and then propagate it up to a higher controller for further processing. This has come up in the XIM project and while it can be worked around, it is much cleaner to be able to do this. Having controllers handle events themselves instead of the events has also been discussed.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT