What is WCF?
What is Windows Communication Foundation? WCF is a framework for creating service-oriented apps. With WCF, you can deliver data as asynchronous messages from one service endpoint to another.
Send data as asynchronous messages from one service endpoint to another with WCF. A service endpoint is part of a continuously available service hosted by IIS, which can be a service hosted in an app. What is an endpoint? An endpoint is an client service that asks data from a service endpoint, below you will find few sample scenarios:
- A protected service for business transactions processing
- A service that provides data to third parties, such as traffic reports etc
- A chat service allowing people to talk to one another or exchange data
- A dashboard app for data services
- Windows Workflow Foundation as WCF service
- A Silverlight app to probe a service for the newest data feeds.
Thanks to WCF, now is very easy to develop endpoints, although creating such apps was possible prior to the existence of WCF. To sum it up we can say about WCF that it offers a manageable approach to creating Web services and Web service clients.
A comprehensive list with Windows Communication Foundation features
WCF offers object oriented programming, allowing functionalities to be encapsulated inside one or more functions, that can call each other, pass some parameters and then deploy some return value.
As long as the essential contracts are met a loosely-coupled relationship suggests that any client created on any platform is able to connect to any service as long as the essential contracts are meet.
About interoperability and Integration, WCF implements high end industry standards for Web service interoperability. WCF has been built to interoperate with web services that support a set of specifications named Web Serviced specs.
Multiple Message Patterns
Few patterns are used for exchanging messages, and the most commonly used one is the request-reply pattern. In this case one endpoint requests data from a second endpoint and the second one replies. There is also another pattern where a single endpoint sends a message without any expectation of a reply. The duplex exchange pattern is considered to be a more complex one, where two endpoints initiate a connection sending data back and forth.
Using formats stated in industry standards such as WSDL, XML Schema and WS-Policy, WCF supports publishing service metadata. For accessing WCF clients this metadata is used to automatically generate and configure clients. Metadata can be published using Web Service Metadata Exchange standard or it can be published over HTTP and HTTPS.
The simplest way to manage data is by creating classes that stand for a data entity with properties that belong to the data entity, in essence, as you code your service is using Visual C# or Visual Basic. The WCF is developed on .NET Framework and includes code-friendly methods of supplying the contracts you want to carry out. Windows Communication Foundation has a comprehensive system for working with data in an easy manner.
Security can be implemented using standards such as SSL or WS-SecureConversation and messages can be encrypted to protect privacy by demanding users to authenticate themselves before being allowed to receive messages.
Multiple Transports and Encodings
WCF permits sending messages over TCP, named pipes and MSMQ. Thanks to a number of built-in protocols and encodings sending messages is allowed. Messages can be encoded as text or by using an optimized binary format. The MTOM standard allows sending binary data efficiently.
Reliable and Queued Messages
The implementation of reliable messaging are made through queues and reliable sessions which are WCF features. Reliable messaging is the way that a reliable messaging source transfers messages reliably to a reliable messaging destination.
A message that is never lost due to disruption in the communication is called durable message. A durable message pattern contains messages that are always saved to a database. The database enables resuming message exchange when the connection is restored if a disruption occurs.