Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Prism-MEF Splash screen Module

$
0
0
Hi,

We took the sample you provided and made changes to it in order to be able to use MEF, some of which include the following:
  • Migrated application from Prism 2.0 to Prism 4.1
  • Changed Bootstrapper to aggregate modules using MEF
  • Added ModuleExport, Export and ImportingConstructor attributes to the corresponding types
  • Removed the manual module initialization from the Bootstrapper (the initialization should be done automatically by the ModuleCatalog)
  • Made modules dependent of the Splash Module, to avoid having them being initialized before it
  • Events that were published on the Bootstrapper were moved to their corresponding Modules
Also we found the following issues that we changed to follow the best practices:
  • Registering types against themselves like this: Container.RegisterType<SplashViewModel, SplashViewModel>();
  • Manual initialization of modules in Bootstrapper. Modules should have an Initialize method.
You can find the sample below:

Prism Splash sample (Prism 4.1)

Hope this helps,

Federico Martinez
http://blogs.southworks.net/fmartinez

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>