Wednesday, March 31, 2010

Describing Windows Communication Foundation

The move to service-oriented communication has changed software development. Viewing services as a distinct software abstraction is fundamental to service-oriented architecture (SOA), an approach that many organizations are putting in place today. Whether implemented using SOAP or in some other way, applications that interact through services are becoming the norm.

Software development environments must keep pace with these changes. The benefits services bring should be reflected in the tools and technologies that developers use. Windows Communication Foundation (WCF), Microsoft’s technology for service-oriented applications, is designed to address these requirements. First released as part of the .NET Framework 3.0 in 2006, an updated version of this technology is included in the .NET Framework 3.5. For a large share of new software built on .NET, WCF is the right foundation.

WCF is designed in accordance with service oriented architecture principles to support distributed computing where services are consumed by consumers. Clients can consume multiple services and services can be consumed by multiple clients. Services are loosely coupled to each other. Services typically have a WSDL interface which any WCF client can use to consume the service, irrespective of which platform the service is hosted on. WCF implements many advanced web services (WS) standards such as WS-Addressing, WS-ReliableMessaging and WS-Security.

[edit] Services

A WCF service is composed of three parts — a Service class that implements the service to be provided, a host environment to host the service, and one or more endpoints to which clients will connect. All communications with the WCF service happens via the endpoints. The endpoints specify a Contract that defines which methods of the Service class will be accessible via the endpoint; each endpoint may expose a different set of methods. The endpoints also define a binding that specifies how a client will communicate with the service and the address where the endpoint is hosted.
In Windows Vista, Windows Server 2008 and Windows 7 (operating systems that include IIS 7), Windows Activation Services can be used to host the WCF service. Otherwise the WCF service can be hosted in IIS, or it can be self-hosted in any process by using the ServiceHost class, which is provided by WCF. A self-hosted WCF service might be provided by a console-based application, a Windows Forms application, or a Windows service (the Windows counterpart to a daemon), for example.

Endpoints

A WCF client connects to a WCF service via an endpoint. 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 over HTTP, SOAP over TCP, and SOAP over Message Queues, etc. Interaction between WCF endpoint and client is done using SOAP envelope. SOAP envelope are in simple XML form that make 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 serialization format to WCF.[1] This allows WCF service endpoints to service requests from AJAX-powered web pages.














*Kindly note above information is taken from different different websites.

The Big Short: Inside the Doomsday Machine