开发者

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

开发者 https://www.devze.com 2023-03-20 16:06 出处:网络
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

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 开发者_StackOverflow社区dropped.

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

Thanks Steve


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.


If you write the application in Silverlight, then it will have to be run inside a browser, unless you make it an Out-of-Browser application. If you write it in WPF, it can be run like a desktop application, but you will have to deploy it on everyone's computer who needs to run it.

If you are not sure of Silverlight, try using Flash instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号