views:

37

answers:

1

I have a very huge Asp.Net application using Asp.net 3.5 with aournd 3000 pages. Now we need to integrate some Silverlight controls in it. For e.g we need to change the dashborad to incorporate new SL UX. My question is that easy to use these 2 technologies i.e. Asp.Net and SL and both have different projects. Will that be difficult for us to communicate with each of these web applications and SL Application. We are in the middle of making a decision as to how to integrate SL in our exisiting application.

Keep in mind that its out of the question that we can shift the whole application to SL. We must have to stick to asp.net 3.5 or 4

Any help or links will be appriciated which can solve this porblem.

Thanks

A: 

There are a couple of methods for communicating between SL and ASP.NET. How easy it is depends upon your development skills....

To talk between the SL application and the ASPX page hosting it on the client side, use the HTML bridge (doco here and here). A word of warning: the bridge can be slow, so you don't want to be too chatty.

To talk between the SL application and the server use WCF web services. These are pretty quick, but you will be forced to use them asynchronously, which means you need to use some different patterns and/or coding styles to what you will be using in your ASPX pages. Some things to watch out for with this:

  • the WCF connections are not persistant across page refreshes (because your SL app gets reloaded) so you will need to re-establish the connection each time the page (or panel holding the SL app) refreshes
  • it can be a PITA to use async web services in a synchronous fashion, so try to avoid this anti-pattern
  • familiarize yourself with patterns like MVVM or MVVMC before you start so that you end up with a nice elegant design rather than some monstrosity that is a cross between classic ASP.NET everything-in-the-codebehind and some retarded halfbreed MVC-MVP mongrel.

To talk between separate SL applications on the same ASPX page, use Silverlight messaging.

slugster
"some retarded halfbreed MVC-MVP mongrel"Thanks for that line, that made my day. :)
Henrik Söderlund