Loading in the order of reference doesn't give me enough flexibility as the
order of reference isn't necessarily the order in which the user will
progress through the interface.

The loading of the controls seems to be a bad solution as well.  As you said
eventually all the controls will exist.  Also, are you familiar with how the
object scope works for loaded swf's?  Is it possible for callbacks from
loaded swf's?  If not then that wont work either.  As they would be
components in an event driven interface and would need to pass events to the
calling swf.  The SWF would potentially need to be able to callback to the
loaded swf on events as well.

The sections as individual SWF's also doesn't seem to work for large
applications as it's you pointed out it's a management nightmare.

It seems that perhaps it really isn't designed with large interfaces in mind
yet?

So perhaps some sort of lazy loading mechanism for parts of the application
so its not compiled into a single SWF file should be on some sort of feature
request list.  If only that were built into it so one could simply develop
that into the MXML and AS files and not have to worry about some sort of
import/separate interface parts as a hack/workaround.

-Courtney Couch
www.courtneycouch.com



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Wednesday, November 09, 2005 6:54 AM
To: [email protected]
Subject: Re: [flexcoders] Lazy loading components

MXML & SWC's are compiled into a final SWF.  Classes are compiled in the 
order in which they reference eachother.  They are immediately available to 
you when your Flex application starts.

Remote Shared Librarires (RSL's), allow multiple Flex applications (SWFs) to

share the same components, both the internal Flex ones, and ones you make 
and plan to make available.  They are loaded in order, like the above with 
the addition of having to download the SWF they are in first; from then on, 
this SWF is cached in your browser cache.  You can treat them as normal 
components & classes that you can immediately access and call all methods 
on.

You have 2 options for lazy instantiation; one is to utilize gregarious 
amounts of queued or none creationPolicies for your containers, and the 
other is load in dynamically loaded SWF's.

While the former provides a lot more control over what is loaded, and when, 
as well as expediating the loading of your application, and improving start 
up time, eventually, in using all the app, all controls will eventually 
exist, just not be displayed.  For Flex 2 this isn't that huge of a deal, 
but for 1.5, even if a visual element isn't shown, it still is rendered, 
albeit slightly.  As such, things could slow down later on depending on what

you are doing.

The other option is to build in sections and/or components in SWF's.  While 
this is the easiest way to load in multiple, unrelated sections with the 
ability to physically remove assets when you are done with them, thus 
clearing resources, this can become a management nightmare depending on how 
many SWF's you plan to use this way.  Additionally, although both SWF's can 
use the same RSL's, they cannot share resources, and classes loaded between 
them is too confusing to write briefly in this email.  Sometimes you have no

choice to do this as it's the most efficient way, and utilizing interfaces, 
one can lessen the pain of having no compiler to help you connect things at 
runtime.  I personally recommend against this.

Hope that helps.




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to