Flex framework RSL – the good, bad and ugly

Filed under: Flash — Wrote by Campbell on Friday, September 19th, 2008 @ 1:22 pm

Well after a small hiccup (hiccup === stress) I though what a great time to take a moment and write a blog post.

For those not quite sure what the Flex framework Remote stored library is, its the core flex code, compiled into a separate binary. This means with changes to your flex project you can separate the flex framework code from your swf to save download times/sizes. There are two versions of this framework binary, a swf and a swz.

The swf is linked and loaded by older flash players and should be loaded from your site. This can be cached by the browser and once cached, the download of your flex application size can save approx <= about 450kb. this swf is local to your site.

The swz version is digitally signed by adobe and the caching of this file is handled by the flash player itself. (READ: clearing browser cache will not clear the framework cache). Once the flash player has cached this file from your site or another site, it is held and used by the flash player for ALL sites. IE. user hits Site A, gets .swz, goes to Site B the .swz file will be used which was loaded from Site A. Again saving you <= 400kb download.

COOL!! …. but

The good: Saving <= 400kb … sweet!

The Bad: Dealing with the Framework RSL documentation can be like reading Swahili (fine if you read Swahili, but I don’t), and can take some time to get your head around.

The ugly: testing is fraught with dangers as once you have the .swz (from any site) you may not see errors when testing your own site.

After all this, its definitely worth implementing, and I advise every flex developer to learn Swahili and get in and check out the docs. One small point for testing though. you can turn off the caching of these framework files, so any problems become glaringly obvoius. This is done through the Global Flash Settings manager.

Flash Settings manager

1) Go to the flash player control panel URL: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html

2)  To delete the cache uncheck the “Store common Flash components to reduce download times” checkbox. Then “confirm” you want to delete the cache. (if you trust me).

3) Re-check the check box if you want to re-enable it (your cache will be cleared), but leave it unchecked if you doing some testing.

Now any errors will be obvious and you will avoid the troubles I just had with upgrading to Flex framework 3.1.xxx.whatever. Hope that helps someone.

© Flex developer, Campbell Anderson, from New Zealand – xsive blog -