简体   繁体   中英

Porting Silverlight to WPF

I have a large Silverlight LOB application which I'm trying to port to a desktop WPF application (because of Silverlight's slow death.)

The xaml & c# code port nicely but the original app uses WCF RIA Services. (Over 30,000 lines.) My question is, can I use the same WCF RIA Service with my WPF app?

Thanks

Here are a few resources you can use to decide if you want to go down that route

How to access a WCF RIA web service from a WPF client application

How to use WCF RIA SERVICES with WPF application?

How to open a WCF RIA Services application to other type of clients: the SOAP endpoint (3/5)

They mostly center around:

  1. Exposing a SOAP endpoint to your WCF RIA web service

  2. Accessing the WCF RIA service as a WCF web service from WPF

  3. Using the WCF SoapClient to access WCF RIA DomainService

是的,你可以像我以前那样做,但是因为你刚刚点击端点并有效地进行获取或发布,你就失去了ria wcf服务附带的变更跟踪功能。

I don't share the other answerers inclinations to use RIA Services for WPF without having an actual RIA Services client: If you don't use an actual RIA Services client compontent as they recommend, that would usually mean rewriting large parts of your data handling code on the client anyway.

Usually, the auto-generated classes are in a RIA Services app are used everywhere, and their behavior isn't easily remodelled. In fact that would be really, really difficult to do and you would be better off to just rewrite most of the thing. Does your app, for instance, not does binding a save button's Disabled property to XyzContext.HasChanges ?

If your app is typical, you really need the real RIA Serives client for a clean port.

Semi-luckily, RIA Services has gone open-source, and WPF support is on their roadmap: OpenRiaServices .

I never used it, and I sense progress on that is a bit slow, but, dending on your own inclinations, it may be a realistic option to use that. You will just have to expect to be a bit on your own by doing it.

Also, do you use any third-party libraries that dependend on RIA Services? For example, if you use DevExpress, you will also have to port their components that use RIA Services ( RiaInstantFeedbackDataSource , etc.).

If you try it, drop a comment on how it went. I have a RIA Services application about the same size myself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM