Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight OOB vs WPF ClickOnce

Silverlight Out of Browser technology and WPF ClickOnce on the surface have similarities. Easy and simple deployment, the ability to specify the level of trust access to the underlying host, etc.

What are the key issues I need to consider when choosing one over the other?

To put a finer point on it, I'll be deploying LOB apps on a corporate network running only windows computers.

like image 579
Phillip Ngan Avatar asked Dec 16 '09 15:12

Phillip Ngan


4 Answers

The big one is cross platform compatibility. If you need you app to run on a mac as well as windows (not sure if Silverlight is supported in Linux yet) then use Silverligt. If you want to make an assumption that all your users will be in a windows machine then go WPF.

Obviously WPF has a much richer toolkit than silverlight so it may well be that silverlight just isn't an option. If I was just building for windows though I know my job would be easier in WPF.

like image 88
James Hay Avatar answered Nov 18 '22 20:11

James Hay


Given that you are targetting a private infrastructure running Windows, two points worth thinking about

  • Wpf has a richer control tree, whereas Silverlight is a reduced set for compact size
  • Wpf requires .Net framework installed locally, whereas Silverlight has its own platform independent browser-based runtime

While your target platform will likely have the latest .Net framework installed, rendering this last point moot, keep in mind any updates to the framework [ie .Net4.0 and any future updates] may require a restart of the machine - which is a major pain point for businesses that demand constant-on stateful desktops [ie anything in finance, like banks and trading].


As with all problems, your requirements, not the technology, should inform your solution. :)

like image 21
johnny g Avatar answered Nov 18 '22 19:11

johnny g


You mentioned trust access to the host which I think rules out Silverlight unless you want to run SL4 (beta).

We recently went through a lot of discussion about file system access. Silverlight 3 runs in a partial trust sandbox more or less. You can't maintain a pointer to files in the files system outside of your application's isolated storage. This was an issue for us as we wanted the user to be able to use the application to reference odds and ends on your file system. That said you can allow the users to load and save files from anywhere on the system but you just get/or push the file stream and (to the best of my knowledge) don't have access to the folder or file path information.

Silverlight 4 (in beta) has support for your application running in full trust mode. I haven't played with this yet however and can't speak to how well it works.

like image 1
Casey Margell Avatar answered Nov 18 '22 19:11

Casey Margell


In talking with a lot of people who work with both Silverlight and WPF, even those who are excited about Silverlight and push for it strongly, I hear a lot of the say fairly emphatically that if you are going to be developing exclusively for a full-trust Windows environment, WPF is hands-down the obvious choice.

That's not to say that Silverlight is an inferior product or that there aren't times will Silverlight will be the clear winner. But when you say "I'll be deploying LOB apps on a corporate network running only windows computers," it sounds like WPF is the clear winnder.

You could decide to go down the Silverlight route in anticipation of all of the great new OOB feature os SL4. I've even heard rumors that SL and WPF will eventually merge, so it may not even really matter, right? Well, I think what you'll find if you go with Silverlight is that some of the advanced features that you thought were there weren't there in the way you expected. For example, SL4 will be able to run in "Elevated Trust" (not full trust) and you might find this limiting at a frustrating point in the project where a lot of your code base is already in Silverlight.

Certainly keep your eyes on Silverlight, but for your current business case, WPF will likely be the best fit.

like image 1
Ben McCormack Avatar answered Nov 18 '22 19:11

Ben McCormack