Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

8. Performance Improvement: Selected Topics > Planning for Modularization

Planning for Modularization

After deciding to use the module and library approach, carefully review all resources besides the ActionScript or MXML code—namely images, sound, and movies (.swf files)—to decide whether you really need to embed them. The rule of thumb is that unless the image must be displayed on the first page, it should not be embedded. It is almost never worthwhile to embed any sizable sound or .swf in the Flex application, as they can use streaming and provide much better control of the execution by starting to play when just enough data is loaded.


Embedded images required in your RIA should be located in a separate Flash Builder project and loaded as RSLs.

The next part is to separate stylesheets and skins into modules. Doing so offers three advantages: first, it separates the work of the designers from the application developers. Second, removing stylesheets and skins from the compilation process significantly reduces rebuild time during development, because the cost of resource transcoding (compilation of fonts and styles) is high. Third, keeping skins and stylesheets outside of the modules simplifies initialization and eliminates unnecessary reloading and reapplying of CSS, thus making module initialization faster and safer.


You are currently reading a PREVIEW of this book.


Get instant access to over $1 million worth of books and videos.


Start a Free 10-Day Trial

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint