views:

119

answers:

2

Hello all

In Silverlight 3.0 we can now create applications with multiple pages using the navigation framework, My question is :

When we run the application does the whole application gets loaded up at once or it gets loaded up when we navigate to a particular page ?

This is probably important for those who want to create an application that gets loaded up very quickly, if everything is loaded up at the begining, the whole user experience might become like a nightmare as they have to wait a long time.

Thank you.

+1  A: 

The entire executing XAP is loaded into memory. This is less important because having the Pages defined is not the bulk of the work. The bulk of the work is when the Pages are constructed and then rendered. The Pages are not constructed/rendered until the Page is navigated to.

If your XAP starts to get bulky (causing the initial download to take some time) you can get around that problem by lazy loading XAPs or assemblies using WebClient.

markti
Thank you very much, I am now looking at some example on how to load the XAPs dynamically.
Raha
+1  A: 

Mmm...

If the entire XAP is loaded check how is stored in browser cache.

On the other hand, you can perform partial loads as markti commented, how to define your views? use interfaces contract, so you can deferr the load the views to show on demand (main XAP loads application, plus interface assemblies, the you divide the views into several DLL's, maybe main page is loaded and the rest just loaded in background).

You can as well use isolated storage to cache that Dll's (then your application will read that Dll's from the local computer).

http://timheuer.com/blog/archive/2008/09/24/silverlight-isolated-storage-caching.aspx

Braulio