MAX, modules, and other stuff…

I’ve been incommunicado in the blogosphere because I’ve been tweaking the compiler to fix some issues discovered in 2.0 that would get in the way of modularizing your app.

If you’re one of the lucky few who have had a chance to play with 2.0.1, you’ll also notice that mx.modules is official!

IM IN UR BETA OPTIMIZING UR SWFS

I’ve put in numerous refinements since the prototype I posted to my blog a while back, including:
– Both low-level AS API and high-level MXML-oriented declarative API supported
– MXML modules fully work and do the CSS thang
– Runtime stylesheets are now possible and are built using modules!
– You can stream extra classes after the application by using the -frame configuration option.
– There’s a dictionary weak-key approach for releasing but reacquiring modules such that they may reload quickly if they didn’t get dumped via GC. This should be handy for apps where you’re only ever visiting one giant module at a time.

I’m pretty happy with it all, and hey, guess what? I’ll be talking a lot about modularizing your app (the general issue, but I’ll touch on mx.modules) at MAX in two workshop sessions titled “Techniques for Delivering Modular Flex Applications”, on Wednesday at 10:30 am and on Thursday at 4:15 pm.

In other news, I’ve decided to move over to the Player team. The compiler has started to stabilize, which is good for you but not as much fun for me. I’ll be dusting off my C++ and getting my hands dirty at a lower level. I’ve gotta say, I’m looking forward to it!

See you at MAX!

6 Responses to MAX, modules, and other stuff…

  1. JesterXL says:

    IM IN UR BETA OPTIMIZING UR SWFS

    LOL! Awesome. A lot better than HAN IN UR STUFF.

  2. Roger, that’s really great. Modular Flex apps are a must if we want flex to success.Hope 2.0.1 will be ready soon, as I was modularizing an Application and would like to do using the official mx.modules way.We only need Cairngorm get some modular approach to support modularization.Thanks 🙂

  3. Thomas says:

    We are currently developing a module based flex application. Since there was no dynamic module/class loading available we were about to write our own classes based on your example. Now that mx.modules seems to be offical it would be very important to know, when it will be available to make decissions about our further development.thx for any kind of input regarding the release date or beta availability :-)Getting to know the flex structure we saw the necessity for a dynamic module loading aproach. Awsome work on Flex btw![You can use the prototype code that I posted in an early blog entry to get started, or get into the 2.0.1 beta… ask Matt Chotin! No dates, sorry. –rg]

  4. Luis Flores says:

    i am REALLY NEW to flex, and as3 programming, and the player VM…. My question is: If there is something like the .NET GAC in the Player VM or to be able to cache components or lib. modules with a version control manager. in context of the domain or global context at the client in the context of the VMI know that will open to security issues (etc) but will give us a lot more power to create applications with a lot more complex set of controls and components , also benefits in file size at the core application.I will like to see :something like a ExpressQuantumGrid for Flex.or SpreadSheet.or a reporting engine like a SuperGrid, ETC.so multiple applications can use them ..with all the intrinsic features related to this, like load and registration on demand depending on version number,etc.Is this contemplate in the implementation of modules?sorry if this is a dumb question.[Security is too huge a concern for this, IMHO. We’re not planning on any cross-domain-shared support for modules. We might do some cross-domain-shared RSLs, but even those will be tightly constrained. You can still benefit from caching modules within your own org structure – or within explicitly set-up trust hierarchies, but not as a generic feature. –rg]

  5. kel says:

    Can you provide some sample code of how to use runtime stylesheets in modular applications

  6. Paul Reilly says:

    Using runtime stylesheets in modules should be no different than using them in a top level application. For an example of using runtime stylesheets, check out the updated FlexStore sample that will ship with Flex 2.0.1. More specifically, check out the loadStyle() function in flexstore.mxml.