WCF - Overview
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的更多相关文章
- 推荐几本不错的ASP.NET MVC书
以前主要是做PHP应用的,由于工作需要,捡起来.NET, 特别是新技术层出不穷,找了几本书看,个人感觉还不错,网上也有电子版的下载 一. ASP.NET MVC4 Web 编程 O'Reilly出版社 ...
- WCF学习系列汇总
最近在学习WCF,打算把一整个系列的文章都”写“出来,包括理论和实践,这里的“写”是翻译,是国外的大牛写好的,我只是搬运工外加翻译.翻译的不好,大家请指正,谢谢了.如果觉得不错的话,也可以给我点赞,这 ...
- WCF开发教程资源收集
WCF开发教程资源收集 1.蒋金楠,网名Artech的博客 [原创]我的WCF之旅(1):创建一个简单的WCF程序[原创]我的WCF之旅(2):Endpoint Overview[原创]我的WCF之旅 ...
- Learning WCF Chapter2 Service Contracts
A service contract describes the operations supported by a service,the message exchange pattern they ...
- Learning WCF Chapter2 Messaging Protocols
In Chapter 1,you were introduced to fundamental WCF concepts, 在章节1中,学习了wcf中的基础概念including how t ...
- 【转】《我的WCF之旅》博文系列汇总
转自:http://www.cnblogs.com/artech/archive/2007/09/15/893838.html WCF是构建和运行互联系统的一系列技术的总称,它是建立在Web Serv ...
- WCF之旅
转载:创建一个简单的WCF程序 http://www.cnblogs.com/artech/archive/2007/02/26/656901.html Endpoint Overview http ...
- WCF Restful调用跨域解决方案
目前很多项目中CRM更多扮演一个纯后台管理系统,用户更多的操作是在移动端执行,不管是安卓还是IOS甚至是H5.这里以H5为例,CRM提供数据接口,移动web端来调用接口进行数据处理,这里就会涉及到一个 ...
- 【WCF学习大全】
我的WCF之旅(1):创建一个简单的WCF程序 我的WCF之旅(2):Endpoint Overview 我的WCF之旅(3):在WCF中实现双向通信(Bi-directional Communica ...
随机推荐
- asp:手机扫描二维码跳转手机版
如果想手机扫描用pc版网站生成的二维码跳转到对应的手机版的话,请在pc端的首页的<head></head>标签里面加入下面内容: <script src=" ...
- Cabarc Overview (Microsoft TechNet)
Original Link: Cabarc Overview Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Ser ...
- mysql主配置文件my.cnf详细说明
MySQL配置文件my.cnf 例子最详细翻译,可以保存做笔记用[转载]#BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大 ...
- 小shell函数
whoport() { port=$1 echo "------ who occupied port: $port ----------" info=$(sudo lsof ...
- Newtonsoft.Json.dll解析json的dll文件使用
要解析的json //解析前 //解析前 {,,,,,,,,,,},,,,,,,,,,,},,,,,,,,,,,,,,,,},,,,,,,,,},,,,,,,,,,,,},,,,,,,,,,,},,, ...
- 只允许输入数字的TextBox控件
[实例说明] 可以在TextBox控件中轻松地输入文本信息,输入的文本信息可以包括字母.数字.汉字等. 如果需要用户在TextBox控件中填写年龄信息,那么年龄信息应当只允许数字,怎么限制用户输入其他 ...
- C#多线程(二)
一.线程池 每次创建一个线程,都会花费几百微秒级别的时间来创建一个私有的局部栈,每个线程默认使用1M的内存.这个可以在使用Thread类的构造函数时设置: new Thread(new ThreadS ...
- 基于Emgu CV 的手势识别实现PPT的控制放映
Emgu CV 简介 众所周知,Emgu CV是.NET平台下对OpenCV图像处理库的封装,也就是.NET版的OpenCV.开发者可以很方便的通过C#,VB等语言调用OpenCV函数 ...
- c语言的一些基础知识
c语言作为经典语言,这里不再多说了.咱从基础一起探讨吧! 一. 定义一个整型,如果作为局部变量,没有初始化的情况下,它是一个随机的值的,一般情况下输出会是0,但这个0是作为垃圾值的;而如果作为全局变量 ...
- 大话string
最近看完大话string之后深有感悟,虽然写c#不知不觉的已经写了四年了,但是很多原理也一直不太明白,最近看完这个才算略微明白了一些. string类型有2个重要的特性,一致性和驻留性. 一致性就是说 ...