Click here to Skip to main content
13,089,818 members (45,828 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


14 bookmarked
Posted 12 Dec 2012

WCF Part 1: Why WCF?

, 12 Dec 2012
Rate this:
Please Sign up or sign in to vote.
Why WCF?

When I create a WCF service, I feel like it is a very easy task but when somebody asks me, why you have created it? then the simplest answer is, I got the requirement like this. But to be honest, nobody tells us to use WCF specifically. Then why there is there a roar over WCF? This post will touch the ‘why’ perspective of WCF and in subsequent articles, we will touch base with WCF through coding or programming.

What’s the Idea Behind WCF?

Idea behind WCF can be described as simplified communication between applications or programs written in different languages or residing at different locations.

We will try to see two important concepts which are required to understand how communication between components can be a possibility.

Note: Here, component refers to a program or functionality which can exist independently.

1. Remote Procedure Calls (RPC)

As per Wikipedia, “a remote procedure call (RPC) is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction” .

In simple words, we have two machines: Server and Client, there is an independent code/program/component available or placed on Server to perform some function. Client like our remote machine is also running a code/program/component, which sends a request to Server to execute program residing on server machine and once execution is over, Server should share the result with program on Client machine who has waited for Server to finish the job.

2. Interfaces

Now we have some idea about RPC, here, we can deduce that Server has to tell the client which all methods are available for use. Now, there is a catch, Server should not expose their methods directly. There should be a level of encapsulation and abstraction applied to protect the functionality. We have interfaces to achieve this kind of feature.

Interface ICalls()
    public void GetCount();

An Interface defines the expected behavior and it is available when Server side component implements this interface by inheritance. This interface can only exist if the component is instantiated. This interface is exposed to the client and, as it hides all the complexities of implementation, client just needs to call the method exposed through interface.

RPC Calls:

Client => Interface=>Server

All the service oriented technologies like COM, DCOM, Remoting, WebService, WCF were developed on this model and can be described as improvised versions of RPC calls via interface. We will try to see the improvements achieved by each of these technologies.

1. COM

Component Object Model - COM can be considered as the birth of communication between the components. In this model, two independent components interact with each other through interface pointers like IUnknown. There is no server and client approach established with COM but components developed on different platforms followed binary standard for function calling between components. Here, the point of interest is communication happens between the components residing at the same location.


Distributed Component Object Model- As COM was not efficient in communication between components residing on remote locations, DCOM came into existence. Wiki has mentioned “The addition of the “D” to COM was due to extensive use of DCE/RPC (Distributed Computing Environment/Remote Procedure Calls)”. DCOM was Microsoft’s version of handling calls between remote components. DCOM was one of the first attempts of distributed environment where client components can request services from server components on other computers in a network.

3. Remoting

DCOM was an improvement over COM but it didn’t achieve a global distribution adaptation so Microsoft came out with .NET Remoting. .NET Remoting helped in improving inter-process communication by providing loose coupling between remote object and client, also made the communication independent of specific formatting. As a result, it was easy to replace one communication protocol with another, or one serialization format with another without recompiling the client or the server. Remoting was able to use HTTP or TCP, and messages could have been formatted as Binary or SOAP.

4. Web Services

Though Remoting was considered more useful, there were some grey areas and web services took care of that.

  • Web Services are interoperable with many software vendors, languages and platforms and not limited to .NET like Remoting
  • Audience is unlimited and available to World Wide Web
  • Easy development, deployment and maintenance
  • Highly scalable
  • Follows open web standards (such as SOAP, HTTP, and XML)

With all the above information, we have passed the journey of communication between components and reached the latest edition of communication, WCF.

How Can We Say It Is An Improvement?

Till WCF came into the picture, every technology was an improvement over the previous one but WCF was one complete product, created and built from the ground up. It can be termed as a unified platform having all the improvisations achieved earlier by COM, DCOM, Remoting, WebService. We can compare it with immediate predecessor.

  • Web services technology uses open web standards and build applications that send and receive messages via the Simple Object Access Protocol (SOAP) over HTTP. The messages sent or received were defined using XML Schema. Same with WCF.
  • There were only simplex and request-response communication possible in WebServices. WCF have simplex, request-response, full duplex communication.
  • Web Services supported only HTTP whereas WCF supported more like TCP, IPC, MSMQ.

We can say at this point why we require WCF compared to other options. In the second article, we will describe WCF and its implementation.

Related Posts

  1. Concepts: S O L I D


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Himanshu DS
Web Developer
India India
I am a regular developer working on c#,,sql,cms,digital marketing related sites. Through my blog, I am showing the non-technical part of our daily technical terms and processes which can be used to describe it to a layman.Sometimes I write basic technical posts also.

You may also be interested in...

Comments and Discussions

GeneralMy vote of 4 Pin
sugnesh.mehta3-Apr-14 16:24
membersugnesh.mehta3-Apr-14 16:24 
QuestionWCF vs COM Pin
rafaelnader12-Dec-12 23:23
memberrafaelnader12-Dec-12 23:23 
AnswerRe: WCF vs COM Pin
Himanshu DS13-Dec-12 1:14
memberHimanshu DS13-Dec-12 1:14 
WCF is an improved version of COM as I have stated in my article. With the help of bindings(which i will cover in later articles), scenario define by you can be achieved. Though, I can not promise the performance criteria, but we will try cover it up in next articles.

AnswerRe: WCF vs COM Pin
Master.Man198013-Dec-12 4:09
memberMaster.Man198013-Dec-12 4:09 
GeneralRe: WCF vs COM Pin
rafaelnader14-Dec-12 1:56
memberrafaelnader14-Dec-12 1:56 
GeneralMy vote of 5 Pin
maq_rohit12-Dec-12 20:14
membermaq_rohit12-Dec-12 20:14 
GeneralRe: My vote of 5 Pin
Himanshu DS12-Dec-12 20:18
memberHimanshu DS12-Dec-12 20:18 
GeneralGood Article Pin
dimpledevani12-Dec-12 19:54
memberdimpledevani12-Dec-12 19:54 
GeneralRe: Good Article Pin
Himanshu DS12-Dec-12 20:06
memberHimanshu DS12-Dec-12 20:06 
GeneralMy vote of 4 Pin
dimpledevani12-Dec-12 19:53
memberdimpledevani12-Dec-12 19:53 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170813.1 | Last Updated 13 Dec 2012
Article Copyright 2012 by Himanshu DS
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid