开发者

Building both a Silverlight 4 and WPF app

开发者 https://www.devze.com 2023-02-18 05:07 出处:网络
We\'re building a Silverlight 4 LOB application. However, we\'re concerned that not all our clients will be able to support Silverlight. For example, most of our clients will be large companies and it

We're building a Silverlight 4 LOB application. However, we're concerned that not all our clients will be able to support Silverlight. For example, most of our clients will be large companies and it's possible their IT department hasn't authorized Silverlight to be installed on user machines. And it's possible that some of our clients will have installe开发者_运维问答d 64 bit versions of IE on user machines. Both of these situations would prevent our clients from using our app.

To deal with this possibility, we'd like to build our app in such a way that it could easily be hosted as a WPF application, if we had to drop back to that position. Our middle-tier and backend would be the same, regardless of the client used.

We're going to initially build our app to be a Silverlight app. A WPF version would come a bit later. My question is this. What precautions should we take, when building our Silverlight app (UI), to make sure the app easily ports to a WPF app (using ClickOnce)?


WPF is (near enough) a superset of Silverlight, so it should be easier going from Silverlight to WPF than it is going the other way. As long as you are using an MVVM framework which abstracts over any platform specific features, then porting the code will be simplified (I would recommend Caliburn.Micro).

Rocky Lhotka (the author of the CSLA business object framework) has a nice blog post on some of the differences between Silverlight and WPF, and things to consider when targeting both platforms.


One of your problems will be solved by Silverlight 5, since SL5 plugin will work in the 64 bit IE. Porting from silverlight to wpf shouldn't be too hard. One thing you can do to guard against possible issues is to get 3rd party library of ui controls that work on both silverlight and wpf. I'd sugest to start with silverlight and move to wpf only if you see real push back from your clients.

0

精彩评论

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

关注公众号