Prism: New drop published
A new drop of Prism has been published last Thursday. Among other things, in this drop we refactored the Bootstrapper by extracting common functionality into a base class named UnityPrismBootstrapper located in the Prism.UnityContainerAdapter project.
For example, the Bootstrapper of the RI now looks like:
public class StockTraderRIBootstrapper : UnityPrismBootstrapper { private readonly EntLibPrismLogger _prismLogger = new EntLibPrismLogger(); protected override IModuleEnumerator GetModuleEnumerator() { return new StaticModuleEnumerator() .AddModule(typeof(NewsModule)) .AddModule(typeof(MarketModule)) .AddModule(typeof(WatchModule), “MarketModule“) .AddModule(typeof(PositionModule), “MarketModule“, “NewsModule“); } protected override IPrismLogger PrismLogger { get { return _prismLogger; } } protected override void ConfigureContainer() { Container.RegisterType<IShellView, Shell>(); base.ConfigureContainer(); } protected override DependencyObject CreateShell() { ShellPresenter presenter = Container.Resolve<ShellPresenter>(); IShellView view = presenter.View; view.ShowView(); return view as DependencyObject; } }
Pretty simple, don’t you think?
Also, we’ve included a new IModuleEnumerator implementation named StaticModuleEnumerator that facilitates the task of statically adding modules to your application. You can see an usage of this new IModuleEnumerator implementation in the GetModuleEnumerator method showed before.
If you want more information about this release, please see the release notes. You can download the drop from here.
BTW - The team has been writing about Prism, so I encourage all to take a look at the following posts:
About Presentation Model
- Using the Presentation Model in WPF by Julian Dominguez
- First approach to Presentation Model with DataTemplates by Julian Dominguez
- Using ViewModels and DataTemplates to compose your UI by Glenn Block
About decoupled communication with Prism
- Decoupled Communication with Prism (intro) by Francis Cheung
- Decoupled Communication with Prism (Shared Views/Services) by Francis Cheung
- Decoupled Communication with Prism (Commanding) by Francis Cheung
- Decoupled Communication with Prism (Event Aggregation) by Francis Cheung
As always, we invite your feedback.
Technorati Profile
Entrevista a Bill Gates…
Ayer fue el último día de Gates como "full time" en Microsoft. Encontré una lista de videos…