Choosing between WPF and Silverlight [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last year.
Improve this questionWe have an existing web application developed using ASP.NET/Ajax We are planning to move it to either WPF or Silverlight.
Can someone please compare these 2 technologies with respect to productivity,performance, maintainability,trade-offs, their pros and cons etc ?
Also,could I also know the advantages/disadvantages of using 开发者_StackOverflowSilverlight over ASP.NET/AJAX?
Thanks for reading.
If you use WPF, it's essentially a "Pretty WinForms App" whereas if you go Silverlight, then you have an "easy-to-deploy-and-manage pretty web app". The code inside both will be nearly identical but it depends on what you want to target. Given that you're replacing a web app, Silverlight may make more sense.
WPF only runs if the .NET environment is installed on the client machine. Silverlight is analogous to something like Adobe Flex (a plug-in "runtime" added to the web browser).
WPF is basically runs on Desktop environment and Silverlight runs on Browser based environment. Sinice your application in ASP.Net/AJAX go for Silverlight. Silverlight is a subset of WPF. So most of the things like Animation, Control Template, Data Binding (Data Template) can be done in Silverlight. One of the major advantage i found using WPF/Silverlight is we can separate the UI team and Business logic development team so that they can work simultanously. Basically its matter of deciding whether to go with Desktop environment or go with Browser based.
Comparing performance Desktop application will have the upper hand when compare to browser based application. Use applications like expression blend for UI design that will give you more flexibility in your development. Another advantage is resources. This is somewhat similar to css but it has some great added feature to override styles and key based style development. My suggestion is go with Silverlight if you want your application to be in browser based other wise go for WPF.
If you want it to remain as a web application, you should clearly choose Silverlight. On the other hand, if you're happy to make this an installable Windows application, then WPF would be the better choice.
If you use the MVVM pattern to design your app then moving from one to the other or even doing both is not very hard. You will also be able have designers go to town using Blend without stomping over code.
My advice would be to go with one or both, but use the MVVM pattern (Composite Application Guidance is a big help in this regard).
Additionally to what was said above: the architecture of your app would be different depending on whether you develop it as a WPF app or a Silverlight app. With Silverlight most probably you will have to work with RIA services and have a different concept for your Models comparing with WPF. Plus, many people think that Silverlight goes down. So you should better look at Html5
精彩评论