Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF):
Windows Communication Foundation
(WCF) is a framework for building service-oriented applications. WCF is a technology that enables applications
in distributed environment to communicate to each other. Purpose of WCF is to
provide a single programming model that can be used to create services on the
.NET platform for organizations. Using WCF, you can send data as asynchronous
messages from one service endpoint to another. WCF is Microsoft's unified
programming model for building service-oriented applications.
Feature of WCF:
There are set of feature in WCF,
in which some are given as follows:
·
Service Orientation:
One consequence of using web
service standards is that WCF enables you to create service oriented
applications. Service-oriented architecture (SOA) is the reliance on Web
services to send and receive data. The services have the general advantage of
being loosely-coupled instead of hard-coded from one application to another. A
loosely-coupled relationship implies that any client created on any platform
can connect to any service as long as the essential contracts are met.
·
Interoperability:
WCF implements modern industry standards for Web service
interoperability through which web services can communicate easily.
·
Multiple Message Pattern:
Messages are exchanged in one of
several patterns. The most common pattern is the request/reply pattern, where
one endpoint (A service endpoint can be part of a continuously available
service hosted by IIS, or it can be a service hosted in an application)
requests data from a second endpoint and second endpoint replies. There is
another patterns such as a one-way message in which a single endpoint sends a
message without any expectation of a reply.
·
Service Meta Data:
WCF supports publishing service
metadata using formats specified in industry standards such as WSDL (Web
Service Description Language), XML Schema and WS-Policy. This metadata can be
used to automatically generate and configure clients for accessing WCF
services. Metadata can be published over HTTP and HTTPS or using the Web
Service Metadata Exchange standard.
·
Data Contracts:
Because WCF is built in .NET
Framework environment, it also includes code-friendly methods of supplying the
contracts you want to enforce. One of the universal types of contracts is the
data contract. In essence, as you code your service using Visual C# or Visual
Basic, the easiest way to handle data is by creating classes that represent a
data entity with properties that belong to the data entity. Once you have
created the classes that represent data, your service automatically generates
the metadata that allows clients to comply with the data types you have
designed.
·
Security:
Messages can be encrypted to protect privacy and you can
require users to authenticate themselves before being allowed to receive
messages. Security can be implemented using well-known standards such as SSL or
WS-Secure conversation.
·
Extensibility:
The WCF architecture has a number of extensibility points.
If extra capability is required, there are a number of entry points that allow
you to customize the behavior of a service.