Modules

| 12 Comments

I put together this presentation for the 360 Flex conference in San Jose. Thank you to those who attended and filled up the room so I could impress my manager with my supposed popularity.

The presentation contains a basic introduction to modules and how to use them, and an attempt to explain ApplicationDomains which are an important factor in how modules and RSLs (Runtime Shared Libraries) work.

The presentation is here: Download file

And some sample code is here: Download file

The sample code has build.script files that require a unix shell and show how some of the MXMLC parameters are used. (The usual caveats, disclaimers, and other legal stuff apply).

Enjoy!

12 Comments

Thanks for this cool presentaiton. Too bad you don't post a AS3 version. I'm not a big fan of MXML.
thanks,
William

The presentation is a ppt... :|

;) Just joking. Thanx for the presentation and source!

Hello!
I don't know if this is good place to post question, but it's module matter.
I'm working on very big project using Flex (and modules). When I'm uploading new version of modules, browsers (IE, Mozilla...) cached old version, because of that new version is not loaded. This thing occurres sometimes, but not always!
Does anyone know the solution for this problem?
Thanks in advance!

Vladimir

--------------

FlexCoders would be a good place to post this question

Great Point ... Thank you for this Article

10x on the presentation.

i want to develop product and want to use the RSL (Runtime Shared Library) of the Flex. i don't know the amount of use with this feature and i will be happy to get info on the amount of site that use this.
it critical for the future of this project.
we want that a lot of users that will come to our site will already have the RSL on their Flash Player.

-------------
Alex responds:

We don't have exact numbers on the shared RSL, but it looks better every day. Ask on FlexCoders and you may get more definitive numbers

Alex, a basic question...
For Popup Modules, you recommend putting the TitleWindow inside the Module, like this:

<mx:Module>
<mx:TitleWindow>
...
</mx:TitleWindow>
</mx:Module>


but if I do this, and use PopUpManager.addPopUp() to raise this object, it is not draggable. What is the solution?
--Henry

--------------------
Alex responds:

The answer should be in this post: http://blogs.adobe.com/aharui/2007/08/popup_dialogs_as_modules.html

i'm using flex 3. from looking at the docs, on the IFlexModuleFactory interface, the create() method allows for ...args to be passed in to allow the module to return different objects.

however, most of the examples i've seen the module is written in MXML and is essentially a 1-to-1 relationship with a single underlying DisplayObject. can you point me to any examples that show how to override this behavior to allow a module to generate multiple types of DisplayObjects? i would like to end up with a module that contains all of the screens i have related to a particular functional area of my app. not a module for each screen.

thanks.

-------------------
Alex responds:

You can pass parameters to the factory, but I don't have any good examples of how or why.

Any classes in the module (assuming they aren't already in the main app) can be factoried by passing the name of the class to the factory method.

Alex,
Thanks. Even after working in Flex for long, I found I didn't know many things present in this presentation. Pure Gem. I am scared of PPTs as sometimes they lack real content. This one had it.

Alex,

How do we communicate between screens within a Module?

Ex: I have Screen1 and Screen2. If I change data on Screen1, according to that I have see changes on Screen2 and vice verse.
How do we do achieve these changes in Flex Module?

-------------------------
Alex responds:

These days, I recommend everyone use a model-view (MV) or MVC architecture. Then interaction in one view/screen affects the data model and the other screen/view is watching for changes to that model via data binding

Alex,

I'm developing a flex portal that integrates ui from different providers.

Is it possible to do the following?

From my main application i want to be able to load modules into a sibling application's domain.

Currently I’ve done the following.
1. Used SwfLoader to load a sub-application into a new application domain (as a sibling of main application domain).
2. From the main application used ModuleLoader to load modules into application domain created in step 1. As a parameter into module loader we specified the application domain of the sub-application created in step 1.

The result is that the module loads but its application domain is set to the main application.

Any ideas?

Thanks,

/Ramon

Alex,
This is really a good presentation . After going through it came to know lot about flash player. looking forward for more of such "under the hood" information .

Leave a comment


Type the characters you see in the picture above.

About this Entry

This page contains a single entry by Alex Harui published on March 7, 2007 2:48 PM.

Welcome was the previous entry in this blog.

Embedded Fonts in Modules is the next entry in this blog.

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