views:

642

answers:

4

What is the difference between Silverlight and XBAP? Where would you use one vs. the other?

+11  A: 

Silverlight is cross-platform and runs its applications in the browser; it can be used anywhere you use a web-browser.

WPF is Windows-only and usually runs its applications on the desktop; it requires that the .NET framework is installed.

Silverlight can be viewed as a subset of WPF (though this isn't technically correct). It does not have quite the feature set that WPF has. What you lose in functionality, though, you gain in adoptability.

WPF can deploy applications through the browser, using what is called an XBAP. This is not the same as Silverlight, though; whereas Silverlight applications are actually integrated into the browser, WPF is merely using the browser as a host for its process.

For a more in-depth guide on the differences between WPF and Silverlight, I would refer to this white-paper on CodePlex.

Charlie
A: 

The big difference is the sandbox. Both are sandboxed, but WPF-Browser apps (e.g. XBAP) can ask for more permissions, but in Silverlight you can't (by design).

Shawn Wildermuth
+2  A: 
  1. From users perspective to view WPF Browser application user will need total dot net framework to be installed that is considerably higher than Silverlight runtime.

  2. WPF browser applications will not work except windows OS

  3. There are much more features you can use (Like real 3D with camera and light) with WPF browser applications that you can not do with silverlight.

Tanmoy
+11  A: 

History Lesson. We made WPF originally to allow design to get more hands on when it comes to Windows based applications as this was consistent feedback we found from the WinForms world. We produce WPF, and it kind of borrowed similar techniques found from HTML but in a more what we'd call mature fashion (XAML).

We then decided (based off customer feedback) to enable a subset of this vision on x-platform and x-browser machines. As a result we ended up with WPF/E (WPF Everywhere) which was later renamed Silverlight.

WPF vs Silverlight. Easy answer is this, if you want create a solution with x-platform / x-browser reach, then Silverlight is your best bet. The downside is you won't be able to break out of the sandbox imposed within browsers, so if its an application that is happy to live in a hands off the machine it dwells in world, Silverlight can provide you a more than reasonable result (Out Of Browser, Isolated Storage etc do allow you more access to a persons machine than normal).

WPF however is there for deep access, meaning you want to access a USB driver or talk to an alternative technology to .NET etc.. same principles, just deeper unrestricted access.

You can deploy .XBAP solutions which is very similar to Silverlight, but provides a bit deeper in terms of access... think of it as the middle child between WPF and Silverlight.

Going Forward. We are spending cycles ensuring WPF/Silverlight converge more in terms of a uniform API etc, to enable you to graduate up/down the technology experience without having to radically shift your logic. We've got frameworks in place today (ie PRISM/MEF) that will help you here, but we are working hard to bring the two technologies back to parity for you all.

Feedback is always welcome and feel free to follow us on twitter to complain/praise via @teamsilverlight.

Scott Barnes / Rich Platforms Product Manager / Microsoft.

Scott Barnes
+1 for a good run-down on this
Jeff Wilcox