WCF Programming Model
A WCF service is made up of three parts: the service, one or more endpoints and a hosting environment.
A service is basically a class written in a .Net compliant language which contains some methods that are exposed through the WCF service. A service may have one or more endpoints – an endpoint is responsible for communication from the service to the client.
Endpoints also have three parts which are known as ‘ABC’: ‘A’ for Address, ‘B’ for Binding and ‘C’ for Contracts.
Address: Address specifies the info about where to find the service.
Binding: Binding specifies the info for how to interact with the service.
Contracts: Contracts specifies the info for how the service is implemented and what it offers.
Finally a hosting environment where the service is contained.
WCF bindings: System-provided WCF bindings are used to specify the transport protocols, encoding, and security details required for clients and services to communicate with each other. As per MSDN followings are the system-provided WCF bindings:
BasicHttpBinding: A binding that is suitable for communication with WS-Basic Profile conformant Web Services like ASMX-based services. This binding uses HTTP as the transport and Text/XML as the message encoding.
WSHttpBinding:
A secure and interoperable binding that is suitable for non-duplex service contracts.
WSDualHttpBinding: A secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP intermediaries.
WSFederationHttpBinding: A secure and interoperable binding that supports the WS-Federation protocol, enabling organizations that are in a federation to efficiently authenticate and authorize users.
NetTcpBinding:
A secure and optimized binding suitable for cross-machine communication between WCF applications
NetNamedPipeBinding:
A secure, reliable, optimized binding that is suitable for on-machine communication between WCF applications.
NetMsmqBinding:
A queued binding that is suitable for cross-machine communication between WCF applications.
NetPeerTcpBinding :
A binding that enables secure, multi-machine communication.
MsmqIntegrationBinding :
MsmqIntegrationBinding: A binding that is suitable for cross-machine communication between a WCF application and existing MSMQ applications.
No comments:
Post a Comment