WCF is the abbreviation for Windows Communication Foundation,is a complete set of technical frameworks designed by MS for SOA (service oriented Architecture Services oriented architecture). WCF is a distributed communication programming framework that Microsoft provides to build service-oriented applications that enable developers to build enterprise-class, connected application solutions that are cross-platform, secure, reliable, and support transactional processing.
the basic concept of WCF is a contract (contract) that defines the protocols that are communicated between the two parties, consisting mainly of four contracts: Service contract, data contract, message contracts (messages contract), Error contract (Fault contract).
where WCF is divided into two parts: the server side and the client. In the WCF framework, the communication between the various application is implemented by endpoint. endpoints is the core element of WCF's implementation of communication . A WCF service consists of a endpoints collection, each endpoint is the gateway for communication, and the client and the server exchange information through endpoint. endpoint is made up of three parts: Address,binding,contract.
a represents address, which contains a URI that indicates that the service exists somewhere on the network, that is, it specifies where to find the service for a client break.
B represents the binding,binding encapsulates the communication details for all client and service segment message exchanges.
C stands for contract, which has already been mentioned above and is no longer burdensome here.
the communication between them can be described in the following diagram:
by summarizing the above, you can simplify the above: WCF is a total interface I to inherit the various sub-interfaces. The data contract is equivalent to the physical layer in three layers, which plays the role of transmitting data. When access is only required to access the total interface I, other services can be accessed through I to achieve distributed results . Look at the following figure:
Introduction to WCF