加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 程序设计 > 正文

WCF服务编程设计规范(7):WCF最佳实践《WCF Best Practice》资料下载与翻译

发布时间:2020-05-23 05:47:36 所属栏目:程序设计 来源:互联网
导读:今天继续《WCF服务编程设计规范》系列,今天推荐一下另外一个学习资料,并提供下载。作者是Brian Noyes,Juval Lowy 的同事。PPT资料《WCF Best Practice》,中文翻译为《WCF最佳实践》。今天内容主要包含,作者介绍,资料的目录结构,然后是翻译的前三部:服

今天继续《WCF服务编程设计规范》系列,今天推荐一下另外一个学习资料,并提供下载。作者是Brian Noyes,Juval Lowy 的同事。PPT资料《WCF Best Practice》,中文翻译为《WCF最佳实践》。今天内容主要包含,作者介绍,资料的目录结构,然后是翻译的前三部:服务定义、异常处理和安全。中英文对照。分享给大家。你可以下载英文版ppt。/Files/frank_xl/WCFBestPractices.pdf 【1】英文目录 Contents: WCF Best Practice
About Brian
Agenda
Service Definition
Service Exception Handling
Service Security
Service Hosting
Self Host Code
Client Proxy Classes
Client Proxy Management
Client Exception Management
Data Contracts
SOAP vs. REST 【2】中文目录: WCF 最佳实践
关于Brian
大纲
服务定义
服务异常处理
服务安全
服务托管
自托管代码
客户端代理类
客户端代理管理
客户端异常管理
数据契约
SOAP和REST

【3】英文名称:《WCF Best Practice》

中文名称:《WCF最佳实践》

【4】About Brian

关于Brian

lBrian Noyes lChief Architect,IDesign IDesign 首席架构师 lbrian.noyes@idesign.net lMicrosoft Regional Director 微软区域总监 lMicrosoft MVP Connected Systems 微软MVP l Publishing 出版 Developing Applications with Windows Workflow Foundation, LiveLessons training DVD,June 2007 Smart Client Deployment with ClickOnce,Addison Wesley,January 2007 Data Binding in Windows Forms 2.0,italic">Addison Wesley,January 2006 MSDN Magazine,MSDN Online,italic">CoDe Magazine,The Server Side .NET,italic">asp.netPRO,Visual Studio Magazine l Speaking 讲座 Microsoft TechEd US,Europe,Malaysia,italic">Visual Studio Connections,DevTeach,italic">INETA Speakers Bureau,MSDN Webcasts E-mail: brian.noyes@idesign.net Blog: http://briannoyes.net

【5】Agenda

大纲

lService Best Practices 服务最佳实践 lClient Best Practices 客户端最佳实践 lData Contracts 数据契约最佳实践 lSOAP vs. REST SOAP 与Rest

【6】Service Definition

服务定义

lSeparate contract from implementation 契约与实现分离 Contract (interface) first 契约(接口)优先 lDefine services in a class library,not directly in a Host project 在类库里定义服务,不要在宿主项目里定义 lLayering 分层 Separate Service Layer? 划分服务层 lInstance model 实例模型 Change to Per Call as default 设置Per Call (单调模式)为默认值 Session / Singleton when? 何时使用会话/ 与单例模式?

【7】Service Exception Handling

服务异常处理

lFor operation specific exceptions 为每个操作指定异常 Try/catch,throw FaultException<T> Try/catch ,抛出FaultException<T> lFavor using FaultException<T> 推荐使用FaultException<T> FaultException can be ambiguous to the client because unhandled exceptions arrive as a FaultException FaultException 对于客户端来说过于模糊,因为未处理的异常都会在客户端表现为FaultException 。 lInclude FaultContract in service contract definition if you throw FaultExceptions 如果你要跑出异常,请在服务契约定义里包含FaultContract (错误契约) Part of the API you are exposing 就要暴露的API 的一部分 lFor global exception handling from services 对于来此服务全局的异常处理 Use an error handler 使用错误处理 lInclude exception details in debug builds only 只有在调试的时候才会包含异常的详细信息

【8】Service Security

服务安全

lIntranet services 企业局域网(以太网)服务 Default Windows Auth may be all you need 默认使用Windows 验证 Possibly Hybrid Windows Creds / Custom Application Roles 或者使用Hybrid Windows 凭据/ 自定义Application 角色 lExtranet / Internet / Custom security needs 企业外部网络/ Internet/ 自定义安全需求 lUse ASP.NET Membership / Role providers 使用ASP.NET Membership / Role providers lASP.NET providers ASP.NET providers Really a standard .NET framework security infrastructure 一个标准的.NET framework 安全基础结构 Built in providers for Windows or SQL Server based credentials / roles 在providers 里为Windows 或SQL Server 内建了基于凭据/ 角色的安全机制 Easy to implement custom providers 容易实现自定义providers Establish principal on the thread 线程上建立principal Re-usable across ASP.NET,WCF,WPF & Windows Forms (via Client Application Services) 可以跨越ASP.NET 、WCF 、WPF 与 Windows Forms ( 通过客户端应用程序服务)

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读