Optimizing RSL Loading

Optimizing the loading of the RSLs is an important step in optimizing your project. Think of an application with 10 modules, 3 of which use datavisualization.swc as an RSL. To avoid redundant loading, we want to insert a singleton’s behavior in the holy grail of any Flex application, SystemManager, which gets engaged by the end of the very first application frame and starts loading RSLs.

The sample application that you’ll be studying in this section is an improved version of the projects from Chapter 7’s section Sample Flex Portal. This section’s source code includes the following Flash Builder projects: OptimizedPortal, FeedModule, ChartsModule, and PortalLib.

Creating Modules with Test Harness

Once again, here’s our main principle of building enterprise Flex applications: a lightweight shell application that loads modules when necessary. This approach leads to the creation of modularized and better-performing RIAs. But when a developer works on a particular module, to be productive, he needs to be able to quickly perform unit and functional tests on his modules without depending too much on the modules his teammates are working on.

The project FeedsModule is an Eclipse Dynamic Web Project with its own “server-side” WebContent directory. This project also includes a very simple application, TestHarness.mxml, that includes just two modules: GoogleFinancialNews and YahooFinancialNews. Let’s say Mary is responsible for the development of these two modules that later ...

Get Agile Enterprise Application Development with Flex now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.