On the second day of the 360Flex conference, I attended some excellent presentations by Alex Harui, Ely Greenfield (Quietly Scheming) and the always entertaining Jesse Warden. The day started with a full discussion of Modules by Alex Harui. When I first heard about Modules in Flex at the Adobe Max 2006, I envisioned the ability to import modules into Flex and talk to them directly through exposed properties, or even bind to them as we currently do with other components. However, the true implementation is slightly less glamorous. Modules are basically used to break up larger applications into smaller chunks.
As you may know, the Flex framework alone represents a robust 135 KB of your application file, and the application simply grows exponentially as you add more components and functionality. Breaking the application into smaller manageable bits will reduce the load time for your Flex applications, but not without some cost. You can not access the classes in a Module directly, you must use an Interface that is shared with the main application and the loaded module. This means you can do introspection as you do with other components and you will have to find a work around to do binding (as we do with Cairngorm).
In the future release of Flex 3 (aka Moxie) you will be able to use modules to load localized text, which would be excellent. There is also a hidden feature in Flex (2.01) that allows you to prelaod modules on frame 3 or later of your application. If you can over come the binding issues with the Interface, your application will benefit greatly with modules for both skinning, preloading, and size for applications that have a lot of smaller parts not needed immediately by the application.
Ely talked about Flex component building, which was similar to his talk at Adobe Max back in October, except for an awsome example of Templating in Flex. His Flex Book example really impressed the crowd and was a terrific way to end the discussion. I was really amazed with his Transparent Anatomy book, this totally floored me, what an excellent idea. Ely is a great speaker with a strong voice and command of Flex component building. I only wish he would not be so “lazy” when he develops some of his Flex component examples, but he explains that he develops these in the wee hours of the morning, so I think that is probably a valid excuse given his role at Adobe and the number of components examples he has produced.
The last presentation of the day was presented by Jesse Warden, who covered Flash and Flex integration. I have used Jesse’s methods to integrate Flash 9 (alpha) animated buttons into Flex application. Jesse has always understood the need to incorporate good design (meaning Flash) into Flex applications. I certainly enjoy his presentation style, he holds nothing back. The only time I have seen Jesse not “on” was just after an apparently bad “Denny’s” experience on the first morning of the conference (ask Jesse for details).






2 Comments
This means you can do introspection as you do with other components and you will have to find a work around to do binding (as we do with Cairngorm).
Does this mean you have figured out a work around with using Cairngorm and modules? I am having a problem with binding my layouts to the data model because it seems that the different models each have different instances of the model (though when the application is flat it works fine).
What I have is a viewstack (now a dynamic moduleloader) that have a bunch of menus in them. When the user clicks one of those it is supposed to change the workflowState of the model to something and flip the main viewstack to be something else (basic cairngorm stuff). Anyway, it doesn’t work when I pull things out to modules.. do you have any advice?
Thanks.
Yes, there is a way to integrate Cairngorm with modules. We are using it to build the next version of our application where I work. I can’t take credit for the method, the original idea came from Kevin Hammer. His method works great so far in a production environment. It was hard to get the set up correct at first, but the process goes very fast once you have your first module created. I also recommend taking a look at Alex Harui’s PPT presentation from 360Flex.