(e-g)Stock Trader : Shellpresenter ; Is it really needed

Topics: Prism v2 - Silverlight 3
May 21, 2010 at 7:43 AM


 Am referring a stock trader implementation. In the userguide, it is said that the purpose of Shellpresenter is "Any logic for the shell presentation is handled by the shell presenter". It basically highlights the seperated presentation pattern.

 The Ishellview is in a seperate class file. The bootstrapper file ,i tried the following method helps to create a shell with out using shelpresenter and it works.

protected override DependencyObject CreateShell()
  IShellView prent = Container.Resolve<IShellView>();
  return prent  as DependencyObject;

As prism speaks about modular programming and if all the business logics are maintained in the respective modules, am amazed what logic the shell presenter could contain ? . Is it really needed to keep the shellpresenter..?

Pls advice





May 31, 2010 at 6:30 PM

Hi Devasena,

As the Shell is a view in terms of the separated presentation patterns, it might contain some presentation logic itself, aside from the views that come from modules. As explained in this article, since most of the application’s functionality and content is provided by modules, the shell has minimal capability. But that doesn’t mean it can’t have any logic at all.

In those scenarios in which it has some presentation logic, it is preferable to have a Shell Presenter, to apply the separate presentation patterns.

I hope you find this helpful.

Guido Leandro Maliandi

Jun 1, 2010 at 1:49 AM

                  Thanks. Thats perfect.