Windows Communication Foundation
Encyclopedia
The Windows Communication Foundation (or WCF), previously known as "Indigo", is an application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 (API) in the .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

 for building connected, service-oriented
Service-oriented architecture
In software engineering, a Service-Oriented Architecture is a set of principles and methodologies for designing and developing software in the form of interoperable services. These services are well-defined business functionalities that are built as software components that can be reused for...

 applications.

The architectures

WCF is meant for designing and deploying distributed applications under service-oriented architecture
Service-oriented architecture
In software engineering, a Service-Oriented Architecture is a set of principles and methodologies for designing and developing software in the form of interoperable services. These services are well-defined business functionalities that are built as software components that can be reused for...

 (SOA) implementation.

WCF is designed using service oriented architecture principles to support distributed computing
Distributed computing
Distributed computing is a field of computer science that studies distributed systems. A distributed system consists of multiple autonomous computers that communicate through a computer network. The computers interact with each other in order to achieve a common goal...

 where services have remote consumers
Client (computing)
A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....

. Clients can consume multiple services; services can be consumed by multiple clients. Services are loosely coupled
Loose coupling
In computing and systems design a loosely coupled system is one where each of its components has, or makes use of, little or no knowledge of the definitions of other separate components. The notion was introduced into organizational studies by Karl Weick...

 to each other. Services typically have a WSDL
Web Services Description Language
The Web Services Description Language is an XML-based language that is used for describing the functionality offered by a Web service. A WSDL description of a web service provides a machine-readable description of how the service can be called, what parameters it expects and what data structures...

 interface
Interface (computer science)
In the field of computer science, an interface is a tool and concept that refers to a point of interaction between components, and is applicable at the level of both hardware and software...

 (Web Services Description Language) that any WCF client can use to consume the service, regardless of which platform the service is hosted on. WCF implements many advanced Web services (WS) standards such as WS-Addressing
WS-Addressing
WS-Addressing or Web Services Addressing is a specification of transport-neutral mechanisms that allow web services to communicate addressing information...

, WS-ReliableMessaging
WS-ReliableMessaging
WS-ReliableMessaging describes a protocol that allows SOAP messages to be reliably delivered between distributed applications in the presence of software component, system, or network failures....

 and WS-Security
WS-Security
WS-Security is a flexible and feature-rich extension to SOAP to apply security to web services. It is a member of the WS-* family of web service specifications and was published by OASIS....

. With the release of .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

 4.0, WCF also provides RSS
RSS
-Mathematics:* Root-sum-square, the square root of the sum of the squares of the elements of a data set* Residual sum of squares in statistics-Technology:* RSS , "Really Simple Syndication" or "Rich Site Summary", a family of web feed formats...

 Syndication Services, WS-Discovery, routing and better support for REST services.

Endpoints

A WCF client connects to a WCF service via an Endpoint
Communication endpoint
A communication endpoint is an interface exposed by a communicating party or by a communication channel. An example of the latter type of a communication endpoint is a publish-subscribe topic or a group in group communication systems....

.
Each service exposes its contract via one or more endpoints. An endpoint has an address (which is a URL specifying where the endpoint can be accessed) and binding properties that specify how the data will be transferred.

The mnemonic "ABC" can be used to remember address/binding / Contract. Binding specifies what communication protocols are used to access the service, whether security mechanisms are to be used, and the like. WCF includes predefined bindings for most common communication protocols such as SOAP
SOAP
SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks...

 over HTTP, SOAP over TCP, and SOAP over Message Queues, etc. Interaction between WCF endpoint and client is done using a SOAP envelope. SOAP envelopes are in simple XML form that makes WCF platform independent.

When a client wants to access the service via an endpoint, it not only needs to know the contract, but it also has to adhere to the binding specified by the endpoint. Thus, both client and server must have compatible endpoints.

With the release of the .NET Framework 3.5 in November 2007, Microsoft released an encoder that added support for the JSON
JSON
JSON , or JavaScript Object Notation, is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects...

 serialization
Serialization
In computer science, in the context of data storage and transmission, serialization is the process of converting a data structure or object state into a format that can be stored and "resurrected" later in the same or another computer environment...

 format to WCF. This allows WCF service endpoints to service requests from AJAX
Ajax
- Mythology :* Ajax , son of Telamon, ruler of Salamis and a hero in the Trojan War, also known as "Ajax the Great"* Ajax the Lesser, son of Oileus, ruler of Locris and the leader of the Locrian contingent during the Trojan War.- People :...

-powered Web pages.

Behaviors

Behaviors are types that modify or extend service or client functionality. Behaviors allow the developer to create custom processing, transformation, or inspection that is applied to messages as they are sent or received. Some examples of uses for behaviors are:
  • Controlling whether metadata is published with a service
  • Adding security features to a service, such as impersonation, authorization, or managing tokens
  • Recording information about messages, such as tracking, tracing, or logging
  • Message or parameter validation
  • Invoking all additional operations when messages are received--such as notifying users when certain messages arrive


Behaviors implement the IServiceBehavior interface for service extensions, the IEndpointBehavior for endpoints, the IContractBehavior interface for service contracts, or the IOperationBehavior for operations. Service behaviors are used for message processing across a service, rather than processing that would be specific to a single operation.

Interoperability

WCF supports interoperability with WCF applications running on the same Windows machine or WCF running on a different Windows machines or standard Web services built on platforms such as Java running on Windows or other operating systems. WCF does not only support SOAP messages, it can also be configured to support standard XML data that is not wrapped in SOAP, or can even be used to support formats such as RSS
RSS
-Mathematics:* Root-sum-square, the square root of the sum of the squares of the elements of a data set* Residual sum of squares in statistics-Technology:* RSS , "Really Simple Syndication" or "Rich Site Summary", a family of web feed formats...

, or JSON
JSON
JSON , or JavaScript Object Notation, is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects...

 that makes WCF flexible for current requirements and future changes.

See also

  • .NET Framework
    .NET Framework
    The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

  • Microsoft Connected Services Framework
  • Web Services Enhancements
    Web Services Enhancements
    Web Services Enhancements is an add-on to the Microsoft .NET Framework which includes a set of classes that implement additional WS-* web service specifications chiefly in areas such as security, reliable messaging, and sending attachments. Web services are business logic components which provide...


Additional Resources about WCF

  • Craig McMurtry, Marc Mercuri, and Nigel Watling: Microsoft Windows Communication Foundation: Hands-On, SAMS Publishing, May 26, 2006, ISBN 0-672-32877-1
  • Steve Resnick, Richard Crane, Chris Bowen: Essential Windows Communication Foundation (WCF): For .NET Framework 3.5, Addison-Wesley, February 11, 2008, ISBN 0-321-44006-4
  • Craig McMurtry, Marc Mercuri, Nigel Watling, Matt Winkler: Windows Communication Foundation Unleashed (WCF), Sams Publishing, March 6, 2007, ISBN 0-672-32948-4
  • Juval Löwy: Programming WCF Services, O'Reilly Media, Inc., February 20, 2007, ISBN 0-596-526997
  • Pablo Cibraro, Kurt Claeys, Fabio Cozzolino, Johann Grabner: Professional WCF 4: Windows Communication Foundation with .NET 4, Wrox, June 15, 2010, ISBN 0-470-56314-1
  • Andrew Zhu: Microsoft Windows Workflow Foundation 4.0 Cookbook:Chapter 3, Packt Publishing, September 2010, ISBN 978-1-849680-78-3

External links


1 of the series articles on WCF RIA Services
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK