WPF vs. Silverlight

First of all, let me start saying that Silvelight is not separate than WPF. It is a sub-set of WPF.

When you look at Visual Studio 2005 or later versions, WPF allows you to create five types of applications.

1.       WPF Application

2.       WPF Browser Application

3.       WPF Custom Control Library

4.       WPF User Control Library

5.       Silverlight Application

Discussion of all these application types is a topic for my next article.

This article focuses on WPF versus Silverlight only. So I am going to cover WPF Application, WPF Browser Application also known as XBAP (XAML Browser Application), and Silverlight application types.

Let’s see pros and cons of each application type based on various following categories.

Application Type - Compare with Current API

  • A WPF Application- A standalone Windows client application and can be a replacement of Windows Forms. Can use Windows Forms controls
  • An XBAP application - A server based application that can be a replacement of ASP.NET and other Intranet based web applications such as ASP, and JSP. Good choice if you need to build a standalone WPF application with browser look and navigation.
  • A Silverlight application - A server based application that can be a replacement of ASP.NET with Flash functionality. Need ASP.NET and HTML to run the application.

Hardware and Servers

  • WPF Application - Runs as an executable (exe) file on a user’s machine. Each client needs to install the executable independently of other clients.
  • XBAP application - Runs on a Web server. Just one machine and one Web server is required for all users.
  • Silverlight application - Runs on a Web server. Just one machine or a few machine (for load balancing and web farms) are required for all users.

Platform Support

  • WPF Application - Runs on Windows operating systems only.
  • XBAP Application - Runs on Windows operating system only. Both server and well as users.
  • Silverlight application - Runs on both Windows and Mac operating systems. Application users must install a Silverlight version of Windows and Moonlight for Mac operating systems.

Runtime Distribution for Users

  • WPF Application - All users need .NET Framework 3.5 or later. There is no need to install anything if a user has Windows Vista or later versions.
  • XBAP application - All users need .NET Framework 3.5 or later. There is no need to install anything if a user has Windows Vista or later versions.
  • Silverlight application - All users must have Silverlight with .NET Framework 3.5 or later versions installed.

User Base

  • WPF Application - Good for one machine one user only.
  • XBAP Application – Good for a small to medium company Intranet based users where everybody is running Windows operating system.
  • Silverlight Application – Good for any number of users specially a Website that can be accessed from anywhere in the world.

Security

  • WPF Application – Totally secure. Only current user has access to the application data.
  • XBAP Application – Secure. Only users within a given Intranet have access to the application data and data is being transferred from local intranet server to local intranet users.
  • Silverlight Application – Less secure. Data is being transferred on the Web using HTTP. Must implement security for valuable data.

RIA

  • WPF Application – Very rich and complex user interfaces including 3D graphics and transformations.
  • XBAP Application – Rich and complex user interfaces.
  • Silverlight Application – Not good for very rich and complex user interfaces. However supports flash-like user interfaces.

Real-World Application Examples

  • WPF Application – Antivirus, Notepad, Graphics design software
  • XBAP Application – Intranet based Website and community
  • Silverlight Application – C# Corner, MySpace, Facebook

Did I miss something? Please post it here.

Cheers!

Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.