Skip navigation
Currently Being Moderated

Flex/Spark Theme Optimizations

Dec 7, 2009 12:36 AM

Hey there,

 

I am getting ready to deploy an app using Spark.  I'm trying to learn as much as I can about RSLs, themes, modules, the compiler etc. to make the general flex user experience much smoother.

 

I have a few pressing questions:

 

1) How are you guys compiling the themes, and what size are they 'slash' how do you get them to be so small?  I've read lots on how to make them small and I've studied the source for months, so maybe you could shed some like on your exact method.

 

2) Looking into SparkClasses.as, it looks as though you are compiling a default theme INTO the spark framework???  That doesn't seem quite right.  That means if I want to use an RSL, I have to create my own build of the framework, which isn't a problem but that dramatically decreases its usability:  now it's highly unlikely someone else will have the same rsl, so no sharing.  It seems like the SparkClasses.as Skins should be in the sparkSkins.swc, or at least separate from the core framework with my own theme without the overhead of this built in one.

 

3) When compiling a theme, is it best-practice to include skins in the library, or are they automatically linked in based on the ClassReference in css (doesn't look like they are, but just checking)?  And since the skins use part of the flex/spark framework, if I specify to use the framework rsls, will they use it?

 

Thanks for your help, it's been a journey trying to understand exactly how to optimize this stuff

 

Lance

 
Replies
  • Currently Being Moderated
    Dec 7, 2009 8:46 AM   in reply to viatropos

    Hi Lance,

     

     

    1.  Our themes are built using compc, and specifying the framework swcs in the external-library-path arguments. This ensures that the framework classes are not included in the theme. For details on our exact method, look at the build.xml files in framework/projects/wireframe or framework/projects/halo.

    2.  The spark theme is being built into the spark framework. Yes, this does add a bit of overhead with the initial load of the RSL, but once it is downloaded it can be shared across all apps.

    3.  When compiling a theme, you must explicitly include your classes, and also do an include-file for your css file. Compc doesn't compile your css file, it simply includes it in your theme swc (with the include-file option). When using your theme with mxmlc, the css file from your theme is compiled and that is when the associated classes/skins are linked in. If you use external-library-path for the framework swcs, it will use the framework classes from the main app, which can either be statically linked or loaded from an rsl.

     

    Glenn

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points