Extending Metro Applications after Deployment

Tags: WinRt

One of the first questions I asked myself when I started developing Metro Style apps with .NET was: How can I design an extensible and manageable application architecture? Some kind of a plug in system is not possible to realize. The reason is that Metro Style apps are deployed via an appx package. The appx package of the application has to contain all executeables (assemblies) of the application. Before deployment, the package gets digitally signed and the runtime executes only code which is correctly signed. Those signed assemblies are the ones which belong to this appx package. This means you cannot add an assembly at a later time and dynamically load it.

My thoughts and talks to MS Program Managers regarding this issue resulted in the following:

  1. Extensibility by using assemblies - An application will not be extensible by adding assemblies after deployment because of the reaosons mentioned before. The only thing you can do is to include all possible plugin assemblies in the appx package and deploy them with the application. Then the user can choose which to enable or disable, or you can build a central management system to control which plugins will be enabled. New plugins have to be added by an entire application update. Interaction with third party components has to be done by using the sharing contract.
  2. Extensibility by using xaml views - It is possible to extend your application with new views defined in xaml. The xaml files can be downloaded to the application at runtime. If you have the view available, you can dynamically load the xaml file and show it to the user. Of course this is a limited approach to extend the application, because you cannot add new application logic.

In my next posts I will show more about the posibilities to dynamically load xaml views. So stay tuned!

No Comments

Add a Comment