Why change from WPF to Silverlight 4?

2019-01-23 11:50发布

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?

8条回答
做自己的国王
2楼-- · 2019-01-23 12:03

I'd like to add an opinion on performance differences.

In my experience, SL's graphics engine is much faster. I was unable to create a control similar to Silverlight's new pivot where thousands of elements move around smoothly in WPF, although with SL I get same the performance I see with pivot itself.

Also, WPF video playback appears to be struggling at only three or four videos on my machine, whereas with Silverlight I can play almost 50 simultaneously.

That is interesting because one would probably assume WPF to be faster.

查看更多
霸刀☆藐视天下
3楼-- · 2019-01-23 12:05

A couple major reasons to consider SL4 over WPF

  1. Smaller framework size. Granted SL4 will probably be much bigger than SL3, but currently the Silverlight framework is about 1/10 the size of the smallest version of .NET 3.5.
  2. Cross platform support- Silverlight runs on Mac and Linux(in theory). This may not be a big issue to you but it is critical in some scenarios.
  3. Much better integration with HTML. Silverlight can live inside a web page and with version 4 html can live inside of Silverlight. Once again, this may not apply to you, but if you need to interoperte with exisiting web apps, Silverlight is definitely the way to go. It will also make it much easier to transition to the web is you need to.
  4. It's clearly where Microsoft if putting its energy. I wouldn't be surprised if WPF is pretty much dead in the water, much like Winforms and LINQ to SQL.
查看更多
等我变得足够好
4楼-- · 2019-01-23 12:07

Keep in mind that Silverlight 4 is currently in Beta with no end-user client runtime available. Silverlight 4 shipped in April of 2010. If you are already developing an app in WPF for the desktop, then it's probably the right solution. However, it would be wise to keep your ear to the ground and follow what's happening in Silverlight in case you may eventually want to port your app to the web space or develop a different app in the web space.

Silverlight 4 brings Silverlight to a whole new level. Check out Tim Heuer's blog post for a lot of the new features. Also, see if you can find a video of the facebook app from the keynote when Silverlight 4 features were announced. That app highlights a ton of the new features that are desktop-focused.

查看更多
Root(大扎)
5楼-- · 2019-01-23 12:08

I can only see one two advantages to choose Silverlight.

  1. You really need cross platform, choose Silverlight.
  2. You need to embed something with HTML in a browser, choose Silverlight

Else if you need an Business Application that are working against web services, Why not use WPF with click once or any other technique to update the software?

The framework installation shouldn't be a big issue when its only installed once, not that big, and are already integrated in newer versions of Windows.

You gain performance, reuse of clr assemblies, and a very big issue for me is that you get full trust with for example reflection which is extremely limited in Silverlight both in browser and out of browser.

And I don't think WPF will die?? WPF have had all the stuff that are new in Silverlight 1,2,3 and 4 for a long time, and still have more. As I see it Silverlight is and always will be a lighter version of WPF for web browsers.

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2019-01-23 12:10

I think your understanding of WPF and Silverlight is a little lacking. Silverlight is a subset of functionality and features that are found in WPF. Silverlight has a few features that are Silverlight specific. Silverlight on the desktop is simply a response to Adobe AIR by Microsoft. So with that said, implement your application with WPF if that's your choice. Don't let "buzz" drive your decisions about your application, that's what business needs and available skills in your organization should do.

查看更多
Evening l夕情丶
7楼-- · 2019-01-23 12:10

As Silverlight is a brand and is being heavily promoted by Microsoft project sponsers and funders are more likely to know it whereas WPF although well known by us will not be known outside the community.

So for future project development this may drive demand for SL4 over WPF particularly if there is a perception that Silverlight development is cheaper than WPF if the learning curve is less for a subset technology (although I don't agree with that sentiment myself).

Of course as far as your current app is concerned switching to SL4 would be nothing more than betting on being an early adopter unless there is a specific feature that you need that is in SL4 and not WPF.

I like the power of WPF but come SL5 I think we will all be on that bandwagon what by 2012?

查看更多
登录 后发表回答