RIA服务与WCF服务:有什么区别 [英] RIA Services versus WCF services: what is a difference

查看:90
本文介绍了RIA服务与WCF服务:有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于如何使用.NET RIA服务构建Silverlight应用程序的信息很多,但尚不清楚WCF中缺少RIA中RIA的独特之处吗?

There are a lot of information how to build Silverlight application using .NET RIA services, but it isn't clear what is unique thing in RIA that is absent in WCF?

以下是围绕该主题讨论的几个主题: [1] [2]

Here are few topics that are talking around this topic: [1], [2]

抱歉,这个愚蠢的问题,但是 RIA Services 图层(如果您已经具有 Silverlight<-> WCF服务<->业务逻辑<->实体框架模型<->数据库?验证?验证?

Sorry for the stupid question, but what does RIA Services layer bring into your app if you already have Silverlight <--> WCF Service <--> Business Logic <--> Entity Framework Model <--> Database? Authentication? Validation? Is it relly asset for you?

目前,我唯一看到的是:使用RIA服务,您不需要手动托管WCF服务,也不需要在客户端(客户端侧== Silverlight应用程序)上配置任何引用。

At the moment the only thing I see: with RIA services usage you don't need to host WCF service manually and don't need to configure any references on the client side (clien side == Silverlight application).

可能我不知道RIA服务的某些非常有用的功能吗?

Probably I don't know some very useful features of the RIA Services? So could you please point me to the good doc for that?

非常感谢。

PS。我读过许多关于差异的文章,但并不能澄清……所有文章都是讲的,并不具体。如果您要给我其他文章的链接,请您这么仁慈,并提供您看到的好处列表。

P.S. I've read a lot of different articles about differences, but can't clarify it... all articles "tell around" and aren't concrete. If you are going to give me a link to additional article, could you please be so kind and provide a list of benefits that YOU see.

推荐答案

实际上,您可以使用相同的验证和身份验证,而无需使用RIA Services。 RIA服务为您提供的是代码生成。它为您创建课程。您只需要放置业务逻辑。我认为RIA服务对于快速开发中小型应用程序非常有用。

Actually, you can use the same validation and authentication without using RIA Services. What RIA Services gives you is code generation. It creates your classes for you. You only need to put the business logic. I think RIA Services is very useful for developing small to mid apps very rapidly.

另一个区别是它隐藏了对Web服务的异步调用。许多人不喜欢异步模型(这是您只能在Silverlight中使用的模型),而RIA服务可以为您处理这种情况。

Another difference is that it hides the asynchronous calls to the web service. Many people don't like the async model (which is the only one you can use in Silverlight) and RIA services handles that for you.

我建议从Shawn Wildermuth指出了两种方法的优缺点,还包括ADO.NET数据服务(我认为现在称为WCF数据服务):

I recommend reading this article from Shawn Wildermuth where he points out the pros and cons from both approaches and also includes ADO.NET data services (which is now called WCF Data Services, I think):

< a href = http://wildermuth.com/2009/09/29/Choosing_a_Data_Access_Layer_for_Silverlight_3 rel = nofollow noreferrer> http://wildermuth.com/2009/09/29/Choosing_a_Data_Access_Layer_for_Silverlight_3

这篇关于RIA服务与WCF服务:有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆