The previous articles, respectively, introduce the basic knowledge of WCF and the three important components of endpoint: Address,contract,binding. But nothing but glimpse, this article on the framework of WCF, from a holistic perspective to the WCF deepen understanding.
The starting point of this article:
By reading this article, you can get the following knowledge:
Schema diagram for WCF
Key elements of the WCF architecture and their concepts
Create a sample program and parse it by schema diagram
This article is suitable for readers:
This article is suitable for WCF beginners, can not know about WCF before, this article is only introduced, does not involve the technical specific technical difficulties and introduction of WCF.
Schema diagram for WCF
The following diagram is a WCF schema:
Key elements of the WCF architecture and their concepts
Contracts and Description (Agreement and description):
The contract defines various aspects of the messaging system. Includes data Contract, message Contract (Messaging protocol), service Contract (services contract). The data contract is the format definition of the information exchanged between service and client in WCF, which is defined by an XML Schema definition language (XSD) that enables both the server and the client to understand the data format definition. A message contract can define a specific part of a message, by default, WCF messages are in a fixed format, but in some cases you can also use message contrace to customize the format of messages. Service contracts Specify method signatures that are exposed by the service side, which can be invoked remotely. As an example of a country and a spy, A is the country C sent to other countries, a spy, he is responsible for the collection of intelligence, through a certain channel, to send the information to the state C, if A in the implementation of the mission before the state C of the Secret Service for it to compile a set of ciphertext, This ciphertext only the state C and the Secret Service and a know the specific meaning, these ciphertext is in a with the country carries on the data, the national C to the cipher text's formulation, is the WCF to exchange the data format the definition, belongs to the data Contract category, and a after obtains the intelligence, Sending the information back to the National Intelligence Agency by Telegraph, it first sets the sending address of the telegram and indicates the source, and sends the intelligence information code Cheng Mi-wen, and the format definition of the Telegraph message belongs to the category of message contract, while the National Intelligence Agency for a wants to accept and send a task command to a. There must also be a fixed communication facility and a person who can be connected by a to the communication facilities and people belonging to the service contract category.