Flex 3.2: Loading sub-apps

| No Comments

The Flex 3.2 SDK has just been released. This release includes many bug fixes, but also one major new feature: improved support for loading sub-applications. Not only can your main app load and interact with sub-apps that are both inside and outside of its security sandbox, but you can also load sub-apps that were compiled with different versions of the Flex compiler (known as multi-versioning).

A sub-application is any application SWF file that is loaded into a main application SWF file. You load sub-apps if you have a portal web site or a form manager or dashboard that uses content from other sites. Sub-apps are like modules in many ways, except they can be loaded locally or cross-domain.

You might not have control over the the source code, or even the version of the compiler, that is being used to compile that sub-app. When you load the sub-app, you get to choose what level of trust your main app will have with it. This is a very important consideration, because if you don't have complete control over the source of a sub-app, you should seriously consider loading that sub-app into a separate security sandbox, rather than loading it into the same security sandbox as the main application.

Of course, there are trade-offs. What the new functionality lets you do depends on the level of trust you have between the main application and the sub-application.
If you load a sub-app into the same sandbox as the main app, then you can have a greater level of data sharing and interaction between the two apps. In separate sandbxoes, the apps have less interoperability (but some is still possible).

To load sub-apps, you still use the SWFLoader control. For multi-versioning support, the class has a new property: loadForCompatibility. Set this property to true to indicate that the sub-application might be compiled with a different version of the compiler.

You can get all the links to info about the Flex 3.2 release here:
http://www.adobe.com/devnet/flex/articles/sdk32_fb302.html

The documentation for the loading sub-applications feature is here:
http://www.adobe.com/go/learn_flex_loading_applications_en

Leave a comment

Community Help

Contribute to Community Help

About this Entry

This page contains a single entry by Matthew J. Horn published on November 17, 2008 4:11 PM.

Check out the Experience Design team's re-launched site was the previous entry in this blog.

Adding ASDoc Comments to Flex MXML files is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.