Tutorial :Mixing application modules between Silverlight and ASP.NET



Question:

Background:
I work in a suite of ASP.NET applications that have several different "modules". The applications all share a main menu, so they all link to one-another. The modules are the high-level areas of the application. So, for example, it might be Payments, Orders, Customers, Products, etc. And Payments and Orders are in one app and Products and Customers are in another. Some of these menu links are "deep links", for example it might be a link to a particular page within the Customers module, such as Create New Customer.

The issue:
We are about to start a project that will add several more modules to this suite, probably as a new .NET application. I'm thinking about doing these new modules in Silverlight (for various reasons that are not material to the question). If I were to do that, I need to make the menu look the same as the menu in ASP.NET, as the users still need to feel like they are inside one "application".

My questions:

  • How should I organize the Silverlight project(s) so that I can "deep link" from ASP.NET pages into particular modules in the Silverlight app?
  • What is even the best idea for creating these different Silverlight "modules"? If I had something that would've been a page in ASP.NET (for example - Create Customer), should each one of those be a separate Silverlight app? Or should it be a separate User Control? Or something else?
  • Should I reuse our shared ASP.NET menu, and deep link to different Silverlight "modules" even within the new application? Or should I reimplement the menu in Silverlight for navigation within the app?
  • Are there menu controls for Silverlight that look similar to ASP.NET menus (with flyout submenus in this case)? Could I maybe even share a SiteMap XML file between them?

Edit:
After looking around a bit more, it seems like PRISM might be the answer for some of my issues. It would allow me to modularize the different chunks of Silverlight that I have. And it would allow me to define a "master page" in Silverlight where I could host the menu. Do I have this right?


Solution:1

Well since I didn't get any answers I guess I'll answer myself.

  • You can "deep link" into Silverlight projects using the Silverlight Navigation Application which is a project type for VS 2010 that comes with the Silverlight Toolkit.
  • You can modularize a Silverlight application using Prism (a.k.a. the Composite Application Block) or MEF (Managed Extensibility Framework). Both frameworks have different pros and cons and different things that they do well.

I haven't decided on how to implement the menu, whether in ASP.NET or Silverlight. But with the building blocks above both would have the necessary functionality.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »