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

WCF Basics

, 17 Aug 2006
Rate this:
Please Sign up or sign in to vote.
An article about the basics of Windows communication foundation

Introduction

Windows communication foundation provides the next generation of distributed communication on the basis of service oriented programming model. This articles gives you an overview of service orientation through WCF.

Background

Current distributed system is mainly based on 4 different communication stacks.

  • ASP.NET Web Services (ASMX) along with the Web Service Enhancements (WSE) extensions to build powerful service oriented application which enables cross platform interoperability and integration.
  • The Microsoft Message Queue (MSMQ) enables transaction integration across multiple parties.
  • The Enterprise Services/COM+ runtime environment
  • .NET Remoting for communication with object across application domain boundaries.

Here the problem is about a single functional specification can take up to 4 implementations. That is, one implementation for each stack client. The implementation strategy for ASMX is quite different from that of Enterprise Services. Each stack client comes with its own architecture and API’s. Above all, COM+, Remoting and MSMQ are specific to Windows platform. Stateless nature of web service limits it’s from enabling context flows and call backs across platform boundaries. So, WCF is all about providing a single programming model that unifies the features of ASMX, MSMQ, Enterprise services and Remoting hence providing interoperability across platforms. Since WCF provides all of the features of these existing Microsoft technologies, WCF supports all of the scenarios currently supported by these technologies. In addition, WCF enables new scenarios that are currently not possible or very hard to implement with existing technologies because WCF allows you to compose functionality across these existing technologies. For example, this means that you’ll be able to achieve secure, reliable, transacted Web services by combining/composing the functionality that previously existed in silos.

Code sample

// Add "plugin" to speak to SOAP clients
BasicHttpBinding bhb = new BasicHttpBinding(BasicHttpSecurityMode.None);
host.AddServiceEndpoint(typeof(IBasicService), bhb, "WCF_BasicService_SOAP");

// Add "plugin" to speak to TCP clients
NetTcpBinding tcp = 
   new NetTcpBinding(System.ServiceModel.Channels.SecurityMode.None);
host.AddServiceEndpoint(typeof(IBasicService), tcp, 
                        "net.tcp://localhost/ WCF_BasicService_TCP");

So if you want to expose your service via HTTP and use SOAP 1.1 for maximum interoperability, and also want to expose it via TCP using a binary wire encoding for maximum performance, the two resulting endpoints can reside side-by-side on top of the very same service. WCF is a vendor neutral model based on web service stack (WS-*) defined by http://www.ws-i.org which enables transactions across windows to non-windows platform. In addition to this, WCF provides state management across platform boundaries and call backs over HTTP.

History

Smile | :) Here goes my second article.

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

Share

About the Author

Bibin.Mohan
Web Developer
United States United States
Presently working with US Technology Resources, Trivandrum.

Comments and Discussions

 
QuestionAdvantages of WCF over Webservices PinmemberBiju Krishnan6-Mar-12 18:45 
QuestionHow can this be submitted PinmemberpremierCoder20-Oct-10 5:33 
GeneralMy vote of 1 Pinmemberfayaz_3e17-Sep-10 5:05 
GeneralMy vote of 1 PinmemberMember 239113122-Jun-10 4:35 
GeneralMy vote of 1 Pinmemberrink415-Oct-09 3:43 
GeneralMy vote of 1 PinmemberMember 617960410-Jul-09 1:46 

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.141022.2 | Last Updated 17 Aug 2006
Article Copyright 2006 by Bibin.Mohan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid