Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why change from WPF to Silverlight 4?

I'm working on an application we made WPF instead of Silverlight as we wanted a full blown desktop application with the whole unique feeling and advantages that gives. However, with the announcement of Silverlight 4 I hear there is a buzz about Silverlight mostly being the preferred choice also for desktop applications.

So; why should I consider moving my WPF application to Silverlight 4 - given that I still want a desktop application?

like image 585
stiank81 Avatar asked Nov 18 '09 19:11

stiank81


People also ask

What is the difference between WPF and Silverlight?

WPF can be ran in both a browser or as a WinForms style application in Windows while Silverlight can only be ran in a browser. WPF is intended to run on Windows systems while Silverlight runs on Windows or Mac, also Linux via Moonlight.

Does WPF use Silverlight?

Summary: 1. Silverlight is simply a subset of WPF.


1 Answers

Choosing WPF or Silverlight or anything else for that matter on the basis that it is trendy seems to me to be just plain silly, unless you are trying to impress a girl or a pointy haired boss.

The purpose of writing software is to make money. That's why Microsoft does it, that's why I do it and presumably that's why you do it. While there certainly are people around who do it because they like doing it or in pursuit of lofty ideals, those people are not effective market forces and have no real say.

Most of the money is in line of business (LOB) applications and all the tools are built with the express purpose of selling them to people trying to build LOB apps, because that represents the bulk of the world's dev tools budget.

Silverlight up to version three essentially competed with Flash, which is to say that it was useless for anything but sparkle on websites: witness all the sample sites linked to the Microsoft Silverlight page.

Microsoft's big push in SL4 is support for LOB development; the RIA tools. But why? Because while you can do LOB development with HTML, CSS, AJAX, Flash and web services, that's a bit like saying you can build a nice car from a Meccano set, provided you're ready to use a lot of bog. Silverlight does the same things, but efficiently and coherently, with a unified development environment. And it's shiny.

This is a tremendous improvement over the shattered toolset for working with HTML, CSS, AJAX, Flash and web services, and if you're selling that integrated development studio, it's just marvellous.

Silverlight means easy rollout. What if they don't have Silverlight? They will, even if Microsoft has to stealth it inside the next service pack. Easy rollout is great if you're the IT dept, and great if you're selling bureau services. It's also great if you're developing because you don't have to muck about developing or testing setup kits.

For bureau type services there is no other sensible choice. For conventional LOB applicatons there is no reason not to use it and deployment is much easier and more convenient. if you need to do something outside those bounds, Silverlight is not appropriate.

It may be of interest to note that my application does a number of things (direct TCP stuff) not supported by Silverlight, and this is no problem at all; the server does them on the client's behalf and this nicely dodges all the environmental hazards surrounding in-the-wild deployments because we can control the server environment.

I think cross-platform support is a furfy, because Silverlight on non-Windows platforms lags far behind, and also non-Windows commercial workstations are few and far between. Businesses don't use Linux on workstations. Macintosh is not a platform, it is a religion: there's no point even talking to them.

All that said, pre-VS2010 there is no Silverlight designer. Hand-coding endless XAML is a colossal pain in the bum. SL4/RIA in VS2010 is wonderful but Joe Public doesn't have it yet and couldn't use it to roll out if he did, because there's no go-live licence or end user run-time.

This leaves WPF as the only practical option. However [drum roll] a final beta with a go-live licence and a run-time will be available Real Soon Now, probably end of February. Kudos to ScottGu and team.

like image 81
Peter Wone Avatar answered Oct 22 '22 17:10

Peter Wone