Click here to Skip to main content
Click here to Skip to main content

Windows Communication Foundation (WCF) and WinFX

By , 5 Apr 2006
Rate this:
Please Sign up or sign in to vote.

Introduction

In today's business world, an organization consists of so many applications in different sizes with different platforms. These applications may be in the form of Object Oriented, Component Based or Service Oriented. One way or the other it is mandatory that these application needs to be communicated to share the data. The ability to share data between a wide network of services that can communicate with other platforms and devices is what Web services are all about.

Windows Communication Foundation (WCF) is Microsoft's unified programming model for building Web service applications with managed code. The following section of this paper will explain the overview of WCF.

Why WCF

The vast variety of applications that are developed today need to communicate with each other. These kind of distributed applications are developed in various technology stacks like .NET Remoting, ASMX, Enterprise Services, System.Messaging and WSE etc. Each technology has its own power advantages.

For e.g. with MSMQ, the application can have a powerful mechanism for scalable, durable and volatile queued messaging that takes care of getting data reliability from one place to next.

Enterprise Services provide transaction integration across multiple parties performing related work in a distributed environment allows throttling access to limited shared resources.

. NET Remoting provides the integrated mechanism for communicating with objects across application domain boundaries in a very flexible and extensibility model.

Windows Communication Foundation is built from the ground-up to combine and extend the capabilities of these existing Microsoft distributed system technologies, including Enterprise Services, System.Messaging, .NET Remoting, ASMX and WSE to deliver a unified development experience. It extends .NET Framework 2.0 and enables the developers to build secure, next-generation Windows based applications. Developers can now focus on business logic and the leave the underlying plumbing to Windows Communication Foundation.
This new set of model is introduced as “WinFX” (Windows Framework) in Microsoft’s Windows next Version.

WinFX

WinFX is the new programming interface introduced in Windows “Vista”. It is the new set of managed code API that Microsoft releases with Vista. It is a unified, managed-code programming model that extends the .NET Framework 2.0 and enables you to build secure, next-generation, Windows-based applications.

WinFX consists of three fundamental frameworks. They are

  • Windows Presentation Foundation (WPF)
  • Windows Communication Foundation (WCF) and
  • Windows Workflow Foundation (WWF)

WPF (formally known as “Avalon”) is a new user interface subsystem and API based on XML, .NET and vector graphics.

WCF (formally known as “Indigo”) is service-oriented messaging system, which allows programs to interoperate locally or remotely similar to web services. It is the Messaging framework of WinFX.

WWF allows task automation and integrated transactions using workflows. This paper targets only WCF.

WinFX is intended to give programmers easier access to the functionality present in the Windows API.

Windows Communication Foundation (WCF)

Windows Communication Foundation is designed as a logical next version of today’s distributed systems technologies. It is Microsoft’s unified framework for building and running service-oriented applications using managed code. It provides new set of Windows API and Service-Oriented programming model. It implements WS-I standards.

The anatomy of WCF will be explained in the following section.

WCF Anatomy

WCF comprised of the following 4 core components. They are Endpoint, Service, Channel, and Behavior. The basic overview is shown in the following figure.

Fig: Windows Communication Foundation (WCF) Anatomy

Endpoint

Endpoint is the basic unit of WCF communication. Endpoint made up of 3 components. They are Address, Binding and Contract. Each of which is explained below.

Address

It defines where the endpoint is. This is equivalent to service address in WSDL. Various Address components are URI, Identity & Headers.

Binding

Defines how the endpoint communicates. It is made up of various binding elements like Transport protocol (TCP, HTTP, MSMQ, named pipes etc), Encoding (text, Message Transmission Optimization Mechanism (MTOM)), binary), security (asymmetric, symmetric and transport) and other aspects like message reliability. This is equivalent to bindings in WSDL.

Contract

Defines what the endpoint communicates. This is equivalent to portType in WSDL. It describes the WCF contracts and their operations. It defines the various operations like One way, request/reply, duplex, queuing etc.,

Service

A program that exposes a collection of endpoints to communicate with outside the world.

Client

A program that exchanges messages with one or more endpoints using channels.

Channel

An abstraction of the connection between the client and an endpoint.

Windows Communication Foundation (WCF) features

Security Features

  • Facilitates interoperability through WS-* standards

  • WS-Trust. Uses the secure messaging mechanisms of WS-Security

  • WS-SecureConversation

  • WS-Federation

  • WS-SecurityPolicy

  • Confidentiality – keeping messages private

  • Authentication – verifying claimed identity

  • Uses transport-level protocol (like HTTPS); only point-to-point secure

  • Uses WS-Security; less efficient but secure from end to end

  • SOAP Message Security (OASIS)

Reliable Messaging

  • Provides for SOAP messages what TCP provides for IP packets

  • Ensures messages are exactly once

  • Handles lost messages and duplicates

  • End-to-end reliability (vs. transport reliability of TCP)

    Queues

    • Leverages Microsoft Message Queuing (MSMQ) as a transport

    • Enables loosely coupled applications and disconnected operations

    Transactions

    • Takes advantage of System.Transactions in .NET 2.0

    • Supports WS-AtomicTransaction

    Compatibility

    COM+

    • Extend COM+ components as Web services

    • Service derived from COM+ interface

    COM

    • Moniker support (GetObject) for usage of WCF services from COM-based applications

    Web Services Enhancements (WSE) 3.0

    .NET v1.x WS-I support add-on library

    Conclusion

    Windows Communication Foundation (WCF, previously codenamed “Indigo”) is Microsoft’s unified framework for building and running service-oriented applications using managed code. It enables developers to build secure, reliable, transacted solutions that integrate across platforms and interoperate with existing investments.

    This enables developers to compose distributed applications using the best features of each of today’s stacks and maximizes developer productivity through a rich, intuitive attribute-based programming model.

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    About the Author

    KRISHNA PRASAD.N
    Web Developer
    United States United States
    No Biography provided

    Comments and Discussions

     
    GeneralAn online guide to WCF at http://wcfguide.blogspot.com/ Pinmemberrcarun8-Jul-06 20:52 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Mobile
    Web01 | 2.8.140415.2 | Last Updated 6 Apr 2006
    Article Copyright 2006 by KRISHNA PRASAD.N
    Everything else Copyright © CodeProject, 1999-2014
    Terms of Use
    Layout: fixed | fluid