The Magic of the Marshall Plan

For the past few months, I’ve been testing a feature for the next release of Flex (not Gumbo, but sooner than that) called the “Marshall Plan”. This feature will allow cross versioning and cross domain applications to be loaded into a parent application using a SWFLoader.

First, let’s talk about cross-versioning. In the future, if you were to have a parent application compiled in Flex 3 load a Flex 2 application using a SWFLoader, you will likely get some unexpected errors. If Flex 3 had changed anything in some of the shared managers like the DragManager, SystemManager, PopUpManager, FocusManager etc, then, your Flex 2 application may not know how to react. Before the Marshall Plan, loaded applications always shared all of these managers, so, you would often get errors because of changes made to these managers in newer versions. With the Marshall Plan feature, we have added a new boolean property to the SWFLoader component, currently called “loadForCompatibility”. When this property is set to TRUE, the SWFLoader will load your child application into its own Application domain. In this Application domain, the child application will have its own version of the managers. Therefore, if you had a parent application compiled in Flex 4 and a child compiled in Flex 3.x (which includes the Marshall Plan), the child application will have its own 3.x DragManager, 3.x PopUpManager etc. while the Flex 4 parent has the 4 DragManager and so on.

In this “compatible” scenario, the Marshall Plan has created the communication between the managers in the parent and child, so, the application should run seamlessly.

In the past, cross domain loading of Flex applications in a SWFLoader were not allowed. You got a runtime error. With the Marshall Plan, you are now allowed to do it. When the child swf is from a different domain, it is considered “untrusted” and is therefore forced to comply to some rules. These boundaries include limiting access to various events like keyboard or mouse information from the parent or being able to drag items or pop ups outside of the SWFLoader boundaries.

I’ve only given a short overview of this new feature, but, you can find a ton of details on how it will work on Adobe’s open source site: http://opensource.adobe.com/wiki/display/flexsdk/Marshall+Plan

Alex Harui who is one of two developers on the Marshall Plan has some information on his blog, but, he is also giving a very detailed talk at Flex 360 this coming week. Alex’s talk is at the unfortunate time of 8:30 AM on Tuesday, but, this is one of those rare opportunities for Flex developers to get access to Alex who can pretty much answer any framework question you decide to throw at him.

5 responses

  1. is eclipse 3.4 supported in the corresponding FB release?

  2. Actually, we just released an update two days ago to the Flex SDK and Builder. The Flex Builder plug-in for this release 3.1 does suppor Eclipse 3.4. The standalone FB 3.1 is still on the Eclipse 3.3 code base. You can find out more about the 3.1 release here:

    http://www.adobe.com/devnet/flex/articles/sdk3_fb301.html

  3. I am using the flex3.2.0 release of the flexBuilder. I run the example of zoomer.but I dont find the MarshalMouseEvent in the sdk which throws an error.
    What is the isssue

  4. We did an API scrub and the MarshalMouseEvent was renamed to SandboxMouseEvent. Try that!

  5. Might you offer an example of marshaling between Application and sub-application ?

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: