Over the years, Microsoft developers have used ASP.NET Web Services (ASMX), .NET Remoting, Enterprise Services/COM+, Web Services Enhancements (WSE) and the Microsoft Message Queue (MSMQ) to build distributed systems. With the Windows Communication Foundation, it has tried to support these diverse technologies under a single, service-oriented umbrella.
Abbreviated WCF, this tool provides a loosely coupled model for distributed system development. It is one of the cornerstones of the .NET Framework 3.0, until recently referred to as WinFX.
In WCF, programmers write a contract, define a service binding and bind the contract to an address. The address, binding and contract make up the ABC service model. In a podcast recorded at Tech Ed, Craig McMurtry, technical evangelist with the WCF group and co-author of Microsoft Windows Communication Foundation: Hands-on,offered some insight into how the ABC model and "contract-first" development work. Click here to listen to the podcast.
The key to contract-first development (as opposed to class-first development) is that it is "divorced from a specific set of tools you have to use," McMurtry said. This means developers can code in C# or VB, rather than XML, before sending a message across the wire, he said.
Coding in one's native language is an obvious plus, but for McMurtry, the greatest improvement in WCF over its predecessors is its management capabilities.
One example is tracing, which allows users to trace the thread of an execution across separate nodes in a network. This addresses a scenario when a communication is lost between, say, a company and a business partner. "Both sides turn on tracing, and the two tracing files correlate" to find out how the nodes are, or are not, working, McMurtry said.
Other management features include a WMI provider, which plugs into networking tools like IBM Tivoli and HP OpenView, and a set of performance counters. These measures can be applied to an entire service, individual endpoints or individual operations of an endpoint, like latency and security. "Anything you would want to monitor for a generic service, we built that in," McMurtry said, adding that specific performance measures can be built in as well.
In addition to management, security receives a boost in Windows Communication Foundation. This is largely due to the introduction of Windows CardSpace, a product previously known as InfoCard that lets end users establishes several claims -- for example, one for work purposes, one for online purchasing, one for social networking and so on. WCF uses this claims-based approach, rather than user identity, to carry out authorization.
"We like to think we've made security easy. For a lot of other technologies, if you want to know how to secure it, you need a whole book," McMurtry said. "We like to think we've boiled it down to a few configs in a given scenario."
Microsoft Windows Communication Foundation: Hands-on is available here from Sams Publishing. Since WCF is in beta -- it's slated for release with Windows Vista -- McMurtry recommended that readers check this page on his blog for updates and additions.