Loading a large Silverlight application from a Web server can be very long. So it is necessary to establish a mechanism for application assemblies progressive loading. The principle consists in dividing the application into multiple packages that are loaded on demand.
MEF, the Managed Extensibility Framework, integrated with Silverlight 4, offers a solution to this problem using the DeploymentCatalog class. But its implementation does not cover some features expected in Out-Of-Browser mode (OOB).
Based on similar work for Silverlight 2, I developed an alternative mechanism in the Perspective 2.0 for Silverlight framework with the following features :
-
Plug-ins loading.
-
Plug-ins pages loading (i.e. for display in a Frame element).
-
Lazy loading support.
-
Works in and outside the browser. Out-Of-Browser plug-ins are loaded from the isolated storage, where they have been installed automatically.
This extension system is not generic : it is limited to loading modules and pages. But it remains simple and can serve as an example developing a more sophisticated system, while waiting for the next MEF version.
Its use is presented in detail in this article.