`
t225com
  • 浏览: 660068 次
文章分类
社区版块
存档分类
最新评论

WCF Data Services 与 WCF RIA Services 的比较

 
阅读更多

在最新的 VS2010 SP1 中 WCF RIA Services 被正式加入, 对于WCF的初学者来说, 这两个概念经常搞混。 都是Services究竟有什么区别呢?来看看下表:

原文 http://jack.ukleja.com/wcf-data-services-vs-wcf-ria-services/

WCF Data Service WCF RIA Service
通过RESTful Web Service暴露的数据模型 MS提供的一种n层应用开发方式
以跨平台访问作为目标
  • 解除数据孤岛
  • 被MS未来的产品所支持,比如:SQL2008,Azure,

    Excel 2010,SharePoint 2010

  • 专为终端到终端的Silverlight和ASP.NET设计的解决方案
  • 一些专有技术的Silverlight(不支持WPF)
  • 使用ASP.NET角色/验证
  • ASP.NET/AJAX也可以访问服务层
  • 松耦合的客户端和服务端 客户端和服务端设计部署在一起(不支持跨域)
    服务层暴露出“原始”数据源 可以轻松地添加业务逻辑
  • 强调"域"的概念
  • 强大的验证框架
  • 支持脱机/同步
  • 服务可以被不同的语言平台调用:Silverlight,AJAX,PHP和Java 服务可以很容易被SL,AJAX所使用
    服务的数据源必须:
  • 至少暴露一个IQueryable的属性
  • 按需实现IUpdateable
  • 服务端通过协议公开域对象:
  • IQueryable GetX
  • UpdateX/InsertX/DeleteX
  • 使用OData协议
  • 基于OData协议的多种格式:JSON,XML等
  • SL:SOAP(二进制)
  • AJAX:JSON
  • 其他客户端:SOAP(XML)
  • 服务可被发现(Discoverable) 服务不可发现
    寄宿于WCF服务(.svc)

    旧版本寄宿于WebApp中自定义的Web Handler(.axd),
    新版本独立为WCF Service

    标准化的OData协议 将支持OData协议

    PS:OData:开放数据协议(OData)是一个查询和更新数据的Web协议。OData应用了web技术如HTTP、Atom发布协议(AtomPub)和JSON等来提供对不同应用程序,服务和存储的信息访问。

    共同特点
    - 基于WCF的
    - 使用REST风格的架构
    - 可用于公开任何数据源(SQL,XML和POCO(plain old CLR object)/对象等)
    - 客户端库(代理)可采用LINQ查询

    其他
    - RIA Service 并不是基于 Data Service
    - RIA Service 将向 Data Service 看齐
    - OData 将成为 WCF 一个基础协议

    参考

    http://blogs.msdn.com/brada/archive/2009/03/19/what-is-net-ria-services.aspx

    http://mschannel9.vo.msecnd.net/o9/mix/09/pptx/t36f.pptx

    http://blogs.msdn.com/endpoint/archive/2009/11/18/the-wcf-services-ecosystem.aspx

    http://www.douglaspurdy.com/2009/11/20/on-odata-open-data-protocol/

    http://msdn.microsoft.com/en-us/data/ee844254.aspx

    http://blogs.msdn.com/saurabh/archive/2009/11/23/understanding-the-wcf-in-wcf-ria-services.aspx

    分享到:
    评论

    相关推荐

      RiaServices(WCF RIA Services V1.0 for Silverlight 4 and Visual Studio 2010)

      WCF RIA Services simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight platforms. RIA Services provides a pattern to write application logic that runs ...

      Programming.Microsoft.SQL.Server.2012

      Deliver data using Windows® Communication Foundation (WCF) Data Services and WCF RIA Services Move your database to the cloud with Windows Azure™ SQL Database Develop Windows Phone cloud ...

      Programming Entity Framework: Building Data Centric

      and ASP.NET MVC applications * Build and consume WCF Services, WCF Data Services, and WCF RIA Services * Use Object Services to work directly with your entity objects * Createpersistent ignorant ...

      silverlight 学习入门DEMO SilverlightLearningPortal.rar

      Silverlight学习入门DEMO源码 源码描述: 一、源码特点 Silverlight学习入门DEMO集合,初学者的... 9、wcf data services 10、wcf ria services 三、注意事项 1、开发环境为Visual Studio 2010,使用.net 4.0开发。

      Silverlight 4 Unleashed(part 1)

      Create data-oriented applications more easily with the WCF RIA Services framework Adapt Silverlight desktop applications for Windows Phone 7 Integrate effects and media into your applications Use ...

      Silverlight 4 Unleashed(part 2)

      Create data-oriented applications more easily with the WCF RIA Services framework Adapt Silverlight desktop applications for Windows Phone 7 Integrate effects and media into your applications Use ...

      Silverlight 4 in Action

      In addition to the fundamentals, the book covers the new features in Silverlight like pixel shaders, webcam and microphone, and raw media, as well as WCF RIA Services and patterns like MVVM (Model-...

      Professional Silverlight 4

      * WCF RIA Services * Out-of-Browser Experiences * Networking Applications * Building Line of Business Applications * Application Architecture * DOM Interaction * Securing Your Applications * ...

      Silverlight4 高级编程

      * WCF RIA Services * Out–of–Browser Experiences * Networking Applications * Building Line of Business Applications * Application Architecture * DOM Interaction * Securing Your Applications *...

      Mastering LOB Development for Silverlight 5

      • To work with professional data access (WCF, RIA Services, Entity Framework, and so on) • To decouple designer and developer roles • To have the user able to install the application as if it was a...

      [C#] C# 4.0 编程 第6版 (英文版)

      You'll learn concurrent programming with C# 4.0, and how to use .NET tools such as the Entity Framework for easier data access, and the Silverlight platform for browser-based RIA development....

      一步一步学Silverlight_2系列

      Silverlight 2系列(17):数据与通信之ADO.NET Data Services Silverlight 2系列(16):数据与通信之JSON Silverlight 2系列(15):数据与通信之ASMX Silverlight 2系列(14):数据与通信之WCF Silverlight 2...

      C#4.0编程(第6版)

      This bestselling tutorial shows you how to build web, desktop, and rich Internet applications using C# 4.0 with .NET's database capabilities, UI framework (WPF), extensive communication services (WCF)...

      Apress.Pro.Business.Applications.with.Silverlight.5.2nd.Edition.Feb.2012

      Note If you decide RIA Services is not suitable for your needs, don’t despair—the functionality covered in this book is not solely dependent on RIA Services, and there will still be large amounts ...

      Programming C# 4.0, 6th Edition

      desktop, and rich Internet applications using C# 4.0 with .NET’s database capabilities, UI framework (WPF), extensive communication services (WCF), and more. In this sixth edition, .NET experts Ian...

    Global site tag (gtag.js) - Google Analytics