Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I start my new browser based C# program in Silverlight or WPF?

Should I start my new browser based C# program in Silverlight or WPF? It will be browser based but it will be used within our organization only, my program will need to talk to Windows file shares if this makes any difference.

I've only done Windows Form Apps and basic ASP.NET apps so far. I don't want to rewrite this in the near future if Silverlight gets dropped.

What would you recommend for ease of learning and future proofing for a Windows form programmer.

Thanks Steve

like image 539
Steve Theok Avatar asked Jul 14 '11 21:07

Steve Theok


1 Answers

No such thing as future proofing. Certainly not in technology.

I don't think either will get 'dropped' in the near future. Both WPF and Silverlight have a steep learning curve (the XAML, the MVVM design pattern, and moving from Procedural to Declarative patterns). If you learn one, you're basically learning the other too.

That said, it depends on your need. My thoughts are usually:

  • If it's a website, use ASP .NET/HTML
  • If it's a simple web application, use ASP .NET/HTML
  • If it's a LOB (line of business) application that doesn't need elevated system privileges, use Silverlight
  • If it's a LOB application that requires full system access and elevated permissions, use WPF

There are a lot of Silverlight headaches (functional limitations) you can run into that WPF doesn't have...so unless you need cross platform and lightweight is very important to you, I usually lean toward WPF. That said, each version of Silverlight comes closer to WPF functionally.

I should add the caveat - I hate web based LOB applications. I've never seen one that isn't hacky or doesn't suffer from usability problems stemming from the technology. No, HTML5 doesn't solve these technological limitations and problems. If I'm working on a LOB application, I'd rather devote my time to making it the most business friendly application possible with a competitive feature set, than focus on making it display right in different browsers, troublshooting cross domain security problems, and maintaining a javascript code base.

like image 70
Jeff Avatar answered Oct 04 '22 23:10

Jeff