本文介绍了什么是Silverlight中使用.NET RIA服务的陷阱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Silverlight中可以使用WCF,Web服务,基于REST的服务,.NET RIA服务,但它似乎像Silverlight和.NET RIA服务是preferred最。

Silverlight can use WCF, Web Services, REST based services, .NET RIA Services, but it seems like Silverlight and .NET RIA Services are preferred most.

我想知道是否有任何共同的问题[它可以是一个显示塞如果一个人去推进这个组合]你已经看到在SL采用.NET RIA服务的实际执行情况。

I want to know if there are any common issues [which can be a show stopper if one goes ahead with this combo] that you have seen in practical implementation of SL with .NET RIA Services.

谢谢,拉胡尔

推荐答案

使用元数据(以及自己写的吧),真是痛苦的屁股。尤其是当你需要更新你的模型。RIA教程应用程序看起来相当不错的一个小数据库,但有一个模型,由数十个的entites的工作,你会花更多的时间更新元数据比编写应用程序本身。这也被连接以验证从资源属性定义和所有验证和描述的消息。但是,我们已经创造了一些T4模板,所以这一切被自动生成的。

Working with metadata (and writing it by yourself) is really pain in the ass. Especially when you need to update your model. RIA tutorial applications look quite well on a small database but working with a model consisting of dozens of entites, you'll spend more time updating metadata than programming the application itself.This is also connected with definition of validation and all the validation and description messages on properties from resources. But we have created some T4 templates so it all gets generated automatically.

在另一方面,我们使用了两个项目的RIA,我必须说这是最好的,我们可以得到的。我们有一些麻烦与验证,但它可以解决(检查属性值是否已改变之前验证)。一旦你意识到与RIA内存管理(你不希望加载整个DATABSE到内存在客户端等),就可以在现实生活中使用。

On the other hand, we're using RIA on two projects and I must say it's the best we can get. We had some troubles with validation but it can be solved (validating before checking whether the property value has changed). And once you are aware of memory management with RIA (you don't want to load the whole databse into memory on client etc.), it can be used in real life.

不幸的是,没有银弹,因此,如果您例如,计划于你的SL应用程序的其他客户端连接到服务器时,你应该看别的地方(WCP数据服务,也许?)。或者,如果你不想从客户端更新数据,我看到RIA是矫枉过正。

Unfortunately, there is no silver bullet, so if you, for example, plan other clients than your SL app to connect to the server, you should probably watch somewhere else (WCP Data Services, maybe?). Or if you don't want to update data from your client, I see RIA as overkill.

这篇关于什么是Silverlight中使用.NET RIA服务的陷阱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-17 00:54