Specifications

203ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
Compile your application against the library When you compile your Flex application, you externalize
assets from your application that are defined in the RSL. They can then be linked at run time rather than at
compile time. You do this when you compile the application by passing the compile-time location of the library
SWC file as well as the run-time location of the library’s SWF file. For more information, see “Compiling applica-
tions with standard and cross-domain RSLs” on page 206.
Optimize the RSL After you generate a library and compile your application against it, you should run the
optimizer against the library’s SWF file. The optimizer reduces the SWF file by removing debugging code and
unneeded metadata from it. While this step is optional, it is best practice to optimize a library SWF file before
deploying it. For more information, see Optimizing RSL SWF files” on page 212.
Deploy the RSL After you have compiled and optionally optimized your RSL, you deploy the library.swf
file with your application so that it is accessible at run time. If the RSL is a cross-domain RSL, then you might also
be required to deploy a crossdomain.xml file.
About standard RSLs
Standard RSLs can only be used by applications that are in the same domain as the RSL. You can benefit from using
standard RSLs if you meet all of the following conditions:
You host multiple applications in the same domain.
You have custom component libraries.
More than one application uses those custom component libraries.
Not all applications can benefit from standard RSLs. Applications that are in different domains or that do not use
component libraries will not benefit from standard RSLs.
Standard RSLs can benefit from digests. While they do not require digests, you can use them to ensure that your
application loads the latest RSL. For more information, see About RSL digests” on page 204.
The following is a list of typical applications that can benefit from standard RSLs:
Large applications that load multiple smaller applications that use a common component library. The top-
level application and all the subordinate applications can share components that are stored in a common RSL.
A family of applications on a server built with a common component library. When the user accesses the first
application, they download an application SWF file and the RSL. When they access the second application, they
download only the application SWF file (the client has already downloaded the RSL, and the components in the
RSL are used by the two applications).
A single monolithic application that changes frequently, but has a large set of components that rarely change.
In this case, the components are downloaded once, while the application itself might be downloaded many times.
This might be the case with charting components, where you might have an application that uses you change
frequently, but the charting components themselves remain fairly static.