views:

7568

answers:

4
+36  Q: 

WPF vs Silverlight.

What are the exact differences between WPF and Silverlight?

+3  A: 

WPF is a Windows desktop technology for developing Windows application in the .Net framework.

Silverlight is a web technology, that is fully supported by a browser plugin on both Windows and MAC (in a similar fashion to Flash). There is also a plugin for running Silverlight on Linux (Moonlight).

While there are similarities between the functionality provided by both WPF and Silverlight (in terms of user interface components and support for XAML) Silverlight is a much small framework, containing a subset of WPF functionality. Newer versions of Silverlight actually contain some functionality not found in WPF, so it is no longer a true subset.

samjudson
Actually, Silverlight features not present in WPF are available through the WPF Toolkit, and will be included in WPF 4
Thomas Levesque
Unfortunately it looks like DeepZoom has been 'cut' from WPF 4.0, so that's one Silverlight feature still missing :-(http://blogs.msdn.com/jaimer/archive/2009/05/27/wpf-4-and-net-framework-4-beta-1-list-of-features-totrack.aspx
CraigD
+66  A: 
SergioL
great response, thanks. But I don't think silverlight will ever support fault.The reason is that browsers intercept HTTP message before sending it to your plugin (i.e silverlight). If the HTTP message has an error code (for example 500), the message isn't transfered to the plugin and is discarded by the browser. But the SOAP V 1.2 specification http://www.w3.org/TR/2007/REC-soap12-part0-20070427/ at the end of the 4.1.2 section say in a nutshell that if the webservice throw a SOAP fault, then the HTTP response's header must return an error 500 "Internal Server Error".
Nicolas Dorier
Actually, it looks like Silverlight 3 will wrap the SOAP exceptions. See the beta documentation at http://msdn.microsoft.com/en-us/library/dd470096(VS.96).aspx.
SergioL
+1 this is good stuff. Thanks for the CodePlex link, too.
Jeff Wilcox
Fantastic answer!! +1
NTDLS
A: 

Things that WPF has that Silverlight doesn't: Full 3d engine based on DirectX, Windows integration such as Windows 7 taskbar thumbnails and system registry availability as well as access to the full .NET Framework including Oracle database support. Also, SL runs in a secure sandbox that prevents access to things such as the entire file system where WPF apps can run full trust with complete system access.

As mentioned above, SL pioneered some technologies such as the VisualStateManager which are making their was secondarily into WPF through the Microsoft supported WPF toolkit.

If you're looking to gauge which technology is right for your project here's a simple way to look at it: If you're writing an app that's meant to run while disconnected from the web, or if you're writing an app that needs access to Windows specific features like the ones listed above then WPF is the way to go. For platform-agnostic, web enabled apps Silverlight is an appropriate choice. Hth.

James Cadd
A: 

You could say that it is [VERY] roughly analogous to the difference between Flex and Adobe Air, but that is somewhat misleading.

WPF refers to the set of technologies (exposed via APIs) that .NET Framework 3.0 and above users have access to in order to draw to the screen.

Many of the WPF APIs are available for Silverlight apps.

There are, of course many other APIs besides WPF that are available under Silverlight since SL apps will need to do a lot more than just draw on the screen.

Andz