Windows Communication Foundation (WCF) is an SDK for developing and deploying services on Windows. WCF provides a runtime environment for your services, enabling you to expose CLR types as services, and to consume other services as CLR types.
WCF is forthcoming Microsoft technology for service-oriented applications; it is designed to address these requirements. WCF is part of .NET 3.0 and requires .NET 2.0, so it can only run on operation systems that support it.
Let me share my project live example scenario to understand WCF working in practical computing world.
To get a sense WHEN to use WCF let me engage you in a problems that WCF addresses, suppose that a car rental firm decides to create a new application for reserving cars. Since this application will run on Windows, the firm chooses to build it on version 2.0 of the .NET Framework. The architects of this rental car reservation application know that the business logic it implements will need to be accessible by other software running both inside and outside their company. Accordingly, it's decided to build it in a service-oriented style, with the application's logic exposed to other software through a well-defined set of services. To implement these services, and thus communicate with other software, the new application will use WCF.
The following is the architecture of the proposed system.
Over its lifetime, the rental car reservation application will likely be accessed by a range of other applications. The rental car reservation application is designed assuming that it's business logic will be accessed, as shown in the figure above, by three other kinds of software.
- A call center client application running on Windows desktops that will be used by employees in the organization's call center. Created specifically for the new reservations system, this application will also be built using the .NET Framework and WCF. (In some sense, this application isn't truly distinct from the new rental car reservation application, since its only purpose is to act as a client for the new system. Still, from a service-oriented perspective, it's just another client for the reservation system's business logic.)¬
- An existing reservation application built on a J2EE server running on a non-Windows system. Due to a recent merger with another car rental firm, this existing system must be able to access the new application's logic to provide customers of the merged firms with a unified experience.¬ Partner applications running on a variety of platforms, each located within a company that has a business arrangement with the car rental firm. Partners might include travel agencies, airlines and others that have a business requirement to make car rental reservations.
For communication with the existing J2EE-based reservation application and with the diverse partner applications, however, interoperability becomes the highest goal. The security requirements are also quite different, varying across local Windows-based applications, a J2EE-based application running on another operating system, and a variety of partner applications coming in across the Internet.
Even transactional requirements might vary, with only the internal applications being allowed to make transactional requests.
So the question is how can we in given diverse business and technical requirements be met without exposing the creators of the new application to unmanageable complexity? The answer to this question is WCF. Designed for exactly this kind of diverse but realistic scenario, WCF will be the default technology for Windows applications that expose and access services. So here I will introduce WCF, examining what it provides and showing how it's used. Throughout this introduction, the scenario just described will serve as an example. The goal is to make clear what WCF is, show what problems it solves, and illustrate how it solves those problems.
Addressing the Problem: WHAT WCF Provides
The foundation for new Windows-based applications is the .NET Framework. Accordingly, WCF is implemented primarily as a set of classes on top of the .NET Framework's Common Language Runtime (CLR). Because it extends their familiar environment, WCF allows developers who create object-oriented applications using the .NET Framework today to also build service-oriented applications in a familiar way.
The figure above shows a simple view of a WCF client and service. The two interact via SOAP, WCF's native protocol, so even though the figure shows both parties built on WCF, this certainly is not required. WCF addresses a range of problems for communicating applications.
- Unification of existing .NET Framework communication technologies.
- Support for cross-vendor interoperability, including reliability, security, and transactions.
A. Unification of Microsoft's Distributed Computing Technologies.
Think about the team of developers implementing the rental car reservation application described earlier. In the absence of WCF, this team would need to choose the right distributed technology from the multiple choices offered by the .NET Framework. Yet given the diverse requirements of this application, no single technology would fit the bill. Instead, the application would probably use multiple existing .NET technologies. For example:
- ASMX, also called ASP.NET Web Services, would be an option for communicating with the J2EE-based existing reservation application and with the partner applications across the Internet. Given that basic Web services are supported today on most platforms, this would likely be the most direct way to achieve cross-vendor interoperability.
- .NET Remoting is a natural choice for communication with the call center application, since both are built on the .NET Framework. Remoting is designed expressly for .NET-to-.NET communication, so it would offer the best performance for this situation.¬
- Enterprise Services (the successor to COM+) might be used by the rental car reservation application for things such as managing object lifetimes and defining distributed transactions. These functions could be useful in communicating with any of the other applications in this scenario, but Enterprise Services supports only a limited set of communication protocols.
- Web Services Enhancements (WSE) could be used along with ASMX to communicate with the J2EE-based reservation application and with the partner applications. Because it implements more recently defined Web services agreements, known collectively as the WS-* specifications, WSE can allow better security and more, as long as all applications involved support compatible versions of these new specifications.¬
- Microsoft Message Queuing (MSMQ) could be used to communicate with Windows-based partner applications that weren't always available. The persistent queuing that MSMQ provides is typically the best solution for intermittently connected applications.



Santosh Kumar KotnalaPosted Feb 3, 2011, 11:01 PM
Nice and use full article. Keep it up..
knightsPosted Feb 3, 2011, 10:48 AM
Hi Vishal, Will you kindly confirm if you have copied the article and resources from http://www.davidchappell.com/introducingwcfv1.2.1.pdf by David Chappell, Chappell & Associates and Microsoft titled. There is no reference mentioned in your article. Thanks.
Kelvin RowlettePosted Jan 5, 2011, 1:32 PM
Very impressive article, It explains all in depth features of this exciting windows based SDK. had some doubts like how it is different frm WCF LOB Adapter SDK and wot types of transport schemas are there in WCF? Will look forward to next post. Cheers kelvin