WCF stands for Windows Communication Foundation.

The elementary feature of WCF is interoperability. It is one of the latest technologies of Microsoft that is used to build service-oriented applications.

wcf的基础特性是互操作性,它是微软最新的一项技术,用来生成面向服务的应用。

Based on the concept of message-based communication, in which an HTTP request is represented uniformly, WCF makes it possible to have a unified API irrespective of diverse transport mechanisms.

根据"基于消息的通信"的概念,在统一采用http请求的情况下,WCF使得拥有一个统一的API变得可能,而不用考虑不同的传输机制     API--Application Programming Interface

elementary 基本的;初级的;[化学] 元素的

interoperability互操作性;互用性

uniformly一致地

unified统一的;一致标准的

irrespective无关的;不考虑的;不顾的

diverse不同的;多种多样的;变化多的

WCF was released for the first time in 2006 as a part of the .NET framework with Windows Vista, and then got updated several times. WCF 4.5 is the most recent version that is now widely used.

WCF在2006年第一次发布,作为Vista操作系统中.net framework的一部分。之后wcf更新了几次。WCF4.5是最新的版本,并且现在使用的最为广泛。

A WCF application consists of three components:    WCF应用由三部分组成

  • WCF service,                     WCF服务
  • WCF service host, and         WCF主机
  • WCF service client.              WCF客户端

WCF platform is also known as the Service Model.    WCF品台也被称为服务模块

Fundamental Concepts of WCF   WCF基本的概念

Message  消息

This is a communication unit that comprises of several parts apart from the body. Message instances are sent as well as received for all types of communication between the client and the service.

这是一个通信单元,由除了body之外的几个部分组成。  消息实例在客户端与服务端的所有类型的通信中被发送和接收。

Endpoint  终结点

It defines the address where a message is to be sent or received. It also specifies the communication mechanism to describe how the messages will be sent along with defining the set of messages. A structure of an endpoint comprises of the following parts:

Endpoint定义了一个消息发往或者接收的地址。它还指定了通信机制来描述消息如何和被定义的信息一起发送。endpoint结构由以下几个部分组成

  • Address - Address specifies the exact location to receive the messages and is specified as a Uniform Resource Identifier (URI). It is expressed as scheme://domain[:port]/[path]. Take a look at the address mentioned below:

    net.tcp://localhost:9000/ServiceA

    Here, 'net.tcp' is the scheme for the TCP protocol. The domain is 'localhost' which can be the name of a machine or a web domain, and the path is 'ServiceA'.

地址:Address 指定了准确的位置来接收消息,并将这个位置命名为url。用  acheme://domain[:port]/[path]来表示,看一下下面提到的地址:

net.tcp://localhost:9000/ServiceA

这里,'net.tcp'是TCP协议模式,域名localhost可以是一个机器或者网络域,路径是ServiceA

  • Binding - It defines the way an endpoint communicates. It comprises of some binding elements that make the infrastructure for communication. For example, a binding states the protocols used for transport like TCP, HTTP, etc., the format of message encoding, and the protocols related to security as well as reliability.

绑定 :Binding定义了终结点的通讯方式。它由一些绑定元素构成,这些元素构成了通讯的底层结构。例如,一个binding声明了用于传输的协议,例如TCP,HTTP等,消息的编码格式,和协议相关的安全性以及可靠性

  • Contracts - It is a collection of operations that specifies what functionality the endpoint exposes to the clinet. It generally consists of an interface name.

契约:它是一系列操作的集合,这些操作指定了endpoint公开给客户端的功能。它通常由一个接口名称构成。

Hosting  托管

Hosting from the viewpoint of WCF refers to the WCF service hosting which can be done through many available options like self-hosting, IIS hosting, and WAS hosting.

从WCF的视角来看Hosting,它涉及到WCF托管服务,托管服务可以通过通过许多选择来完成,例如self-hosting, IIS hosting, and WAS hosting.

Metadata  元数据

This is a significant concept of WCF, as it facilitates easy interaction between a client application and a WCF service. Normally, metadata for a WCF service is generated automatically when enabled, and this is done by inspection of service and its endpoints.

metadata是WCF中的一个重要概念,因为它促进了客户度应用和WCF服务之间的简单互动。通常,在允许的情况下,WCF的元数据是自动生成的,这是通过检查服务以及终结点来完成的。

facilitate促进

WCF Client

A client application that gets created for exposing the service operations in the form of methods is known as a WCF client. This can be hosted by any application, even the one that does service hosting.

客户端应用被创建,以方法的形式来公开服务操作,客户端应用也被称为WCF客户端。  这可以由任务应用来托管,即使是托管服务的应用也可以。

Channel

Channel is a medium through which a client communicates with a service. Different types of channels get stacked and are known as Channel Stacks.

信道是客户端和服务进行通信的中介。不同类型的信道get stacked,也被称为信道栈。

SOAP

Although termed as ‘Simple Object Access Protocol’, SOAP is not a transport protocol; instead it is an XML document comprising of a header and body section.

soap也被称为"Simple Object Access Protocol"简单对象访问协议,soap不是一个传输协议。相反,它是一个由header以及body部分构成的xml文档。

Advantages of WCF   WCF的优点

  • It is interoperable with respect to other services. This is in sharp contrast to .NET Remoting in which both the client and the service must have .Net.

  • WCF services offer enhanced reliability as well as security in comparison to ASMX (Active Server Methods) web services.

  • Implementing the security model and binding change in WCF do not require a major change in coding. Just a few configuration changes is required to meet the constraints.

  • WCF has built-in logging mechanism whereas in other technologies, it is essential to do the requisite coding.

  • WCF has integrated AJAX and support for JSON (JavaScript object notation).

  • It offers scalability and support for up-coming web service standards.

  • It has a default security mechanism which is extremely robust.

1.相对其他服务而言,wcf是可以彼此协作的。这和.net远程形成了鲜明的对比,.net远程要求客户端和服务端必须由.net环境。

2.和ASMX网络服务相比,WCF服务提供了增强的可靠性以及安全性

3.实现了安全模型,将变化绑定至WCF无需在代码上进行大的改动。仅需要配置做一些改变就可以达到约束的要求

4.WCF有内置的日志机制,然而在其他技术中,为此编码是必不可少的

5.WCF集成了AJAX并且支持json

6.它为即将到来的web服务标准提供了可扩展性与支持

7.它有默认的安全机制,并且这个安全机制及其稳健

interoperable彼此协作的;能共同操作的;能共同使用的

WCF - Overview的更多相关文章

  1. 推荐几本不错的ASP.NET MVC书

    以前主要是做PHP应用的,由于工作需要,捡起来.NET, 特别是新技术层出不穷,找了几本书看,个人感觉还不错,网上也有电子版的下载 一. ASP.NET MVC4 Web 编程 O'Reilly出版社 ...

  2. WCF学习系列汇总

    最近在学习WCF,打算把一整个系列的文章都”写“出来,包括理论和实践,这里的“写”是翻译,是国外的大牛写好的,我只是搬运工外加翻译.翻译的不好,大家请指正,谢谢了.如果觉得不错的话,也可以给我点赞,这 ...

  3. WCF开发教程资源收集

    WCF开发教程资源收集 1.蒋金楠,网名Artech的博客 [原创]我的WCF之旅(1):创建一个简单的WCF程序[原创]我的WCF之旅(2):Endpoint Overview[原创]我的WCF之旅 ...

  4. Learning WCF Chapter2 Service Contracts

    A service contract describes the operations supported by a service,the message exchange pattern they ...

  5. Learning WCF Chapter2 Messaging Protocols

    In Chapter 1,you were introduced to fundamental WCF concepts,      在章节1中,学习了wcf中的基础概念including how t ...

  6. 【转】《我的WCF之旅》博文系列汇总

    转自:http://www.cnblogs.com/artech/archive/2007/09/15/893838.html WCF是构建和运行互联系统的一系列技术的总称,它是建立在Web Serv ...

  7. WCF之旅

    转载:创建一个简单的WCF程序 http://www.cnblogs.com/artech/archive/2007/02/26/656901.html  Endpoint Overview http ...

  8. WCF Restful调用跨域解决方案

    目前很多项目中CRM更多扮演一个纯后台管理系统,用户更多的操作是在移动端执行,不管是安卓还是IOS甚至是H5.这里以H5为例,CRM提供数据接口,移动web端来调用接口进行数据处理,这里就会涉及到一个 ...

  9. 【WCF学习大全】

    我的WCF之旅(1):创建一个简单的WCF程序 我的WCF之旅(2):Endpoint Overview 我的WCF之旅(3):在WCF中实现双向通信(Bi-directional Communica ...

随机推荐

  1. iOS开发——屏幕尺寸适配

    对于屏幕尺寸适配,目前先指竖屏的方式适合方式1和2. 1.控件尺寸写死的方式,偶尔会用到屏幕的宽度和高度. UILabel *holdLabel = [[UILabel alloc]initWithF ...

  2. 移动前端开发之viewport的深入理解(转载)

    本文为转载文章,原文网址:http://www.cnblogs.com/2050/p/3877280.html 在移动设备上进行网页的重构或开发,首先得搞明白的就是移动设备上的viewport了,只有 ...

  3. 使用CHttpFile从服务器端正确的读取数据

    前段时间在给软件做升级提示模块的时候发现一个问题,就是使用CHttpFile对象无法从服务器端获取到正确的响应数据长度,无论是使用CHttpFile:: QueryInfo方法,还是使用CHttpFi ...

  4. 九度OJ 1386 旋转数组的最小数字 【算法】

    题目地址:http://ac.jobdu.com/problem.php?pid=1386 题目描述: 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转.输入一个递增排序的数组的一个旋 ...

  5. 配置php的CAS客户端

    1.下载安装xmapp 2.开启Apache服务. 3.下载php的CAS客户端源码包(我使用的是CAS-1.2.0.tgz),解压到xmap的htdocs目录下(D:\xmapp\htdocs),进 ...

  6. 踩过的坑系列之InputStream.read(byte[])方法

    项目之前都是好好的,最近现场那边出现一个问题,报错不是合法的json字符串,这个json字符串是通过http请求访问获得的. 通过直接在浏览器上直接访问http这个请求,发现返回的json也是完全正确 ...

  7. <meta name="viewport" content="width=device-width, initial-scale=1" />

    今天第一次用JQuery Mobile做了个3个手机小页面,一个登陆页面.一个列表页面和一个表单页面,页面中的组件呈现一切正常. 但出现了一个奇怪的问题,登陆页面大小正常,到了列表页面和表单页面就显得 ...

  8. Android Studio第一次提交git使用

    安装: Git客户端网址:http://git-scm.com/download/ 根据自己的使用平台下载对应的客户端.这里以Mac系统为例,当客户端软件安装配置完毕后,打开AS的配置面板,找到Git ...

  9. [HTML]img标签属性

    <img src="image.png" width="" height="" align="absmiddle" ...

  10. django1.6之创建用户

    如何你运行python manager.py syncdb(数据库同步成功) 则运行一下代码 >>> from django.contrib.auth.models import U ...