Skip to main content

Microsoft Silverlight

Answered Question Approaching Silverlight 2 development in light of MVCRSS Feed

(0)

Dimebrain
Dimebrain

Member

Member

23 points

22 Posts

Approaching Silverlight 2 development in light of MVC

I was wondering how to approach Silverlight 2 in terms of developing an ASP.NET MVC web application. I recognize that the paradigms are different, but notice that John Lam's Dynamic Silverlight examples use an ASP.NET MVC template, and reference .xaml files within it.

When starting a project using both of these technologies, is it better to create an MVC application and add .xaml directly to it, or build a Silverlight Application project type and apply MVC practices there? Does either approach have an any advantage in terms of communicating with each other via REST?

Also, a Silverlight Library can only be referenced by a Silverlight Application. What does the Silverlight library buy me that makes it worth using the Silverlight Application project type and trying to bolt on MVC practices?

Or am I missing the point entirely and I need to create a Silverlight Application project that talks to a separate MVC web application concurrently?

Any pointers would be appreciated!


 

Some day I'll be able to answer more questions than I ask.

samcov
samcov

Participant

Participant

969 points

379 Posts

Answered Question

Re: Approaching Silverlight 2 development in light of MVC

Wow, a lot of questions in one single post.  I don't have all the answers, but here's a few points.

  1. SilverLight can coexist with ASP.Net, however, I would concentrate on the elimination of ASP.Net to communicate with the server side MVC app.
  2. Think of SilverLight as the client, and anything on the server as something to deliver data and resources to the client.  In that respect, yes, the MVC can deliver xaml, dll's, sql data, pictures, video, and other things to the client on demand.
  3. SilverLight libraries are on the client, so it's seperated from the MVC server.  MVC and SilverLight are conceptually orthogonal

Finally, you're right(see #3), the SilverLight client talks to the MVC on the server, exactly like the ASP.Net client would.  You just have a richer client in the equation.

"The difference between genius and stupidity is that genius has its limits." - Albert Einstein

Dimebrain
Dimebrain

Member

Member

23 points

22 Posts

Re: Approaching Silverlight 2 development in light of MVC

Thanks for the detailed reply. My questions come from trying to comprehend the entire broad web stack and making false connections between them simply because of how much there is to digest. For example, ASP.NET AJAX automatically generates javascript proxies to services provided elsewhere, so I assumed that that would be the delivery mechanism for piping data to Silverlight controls, which could work if they were embedded in an ASP.NET Page, however I am starting to see more clearly thanks to your summaries that Silverlight as a rich client is going to cover those aspects and that it's really going to involve a departure from those other technologies.

And that pin dropping is the sound of most of last year's web technologies becoming obsolete, or at least practically irrelevant. 

Some day I'll be able to answer more questions than I ask.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities