0
votes

When we create a project using modules in flex, how the modules loaded into browser. Say for example I have 4 modules in my project. I build the application and all modules are compiled. On the client side(browser) the application is loaded into the browser. The loaded application contains all the modules. Will all the modules loaded into cache of browser in the begining itself? Or is it like this, default modules loads first. When we click on second module, the previously loaded module unloads and then only requested module gets loaded from server?

1

1 Answers

0
votes

When flex application is compiled, it is converted into compiled format which can run in the flash player. This compiled format is the swf file. When a flex application is built without using modules, the whole application is compiled into swf. The size of the swf is larger because it contains the code of whole application. When this is run into the browser, the whole swf is downloaded by the browser. It slows the download process. Therefore the startup time of the application is delayed. When we are using the modules, the individual modules are compiled into separate swf files. The default swf is smaller in size. When the application is run inside the browser, initially the default swf which is the application.swf is downloaded first. Since its size is small the startup time is much lesser. Then other modules are loaded on demand basis. This way only modules which are needed are loaded into the browser.