WCF Windows Communication Foundation in 5 minutes Part 1

Hello Friends,

Today I am going to discuss new topic which is WCF.

As you know today market demand is Services. Every company needed Service Oriented Architecture (SOA) and in SOA first and basic thing is communication for service so Microsoft provide a  new way of communication for services which is WCF. So let’s start with our questionnaires.

1. What is WCF?

Its full name is Windows Communication Foundation. It’s also called Indigo. Its basically introduce in Dot net 3.0.

WCF is new way of communication between client & server. Its technology by which a client & server can communicate with each other. It provides direct support for Service orientation. Its help in distributed application creation its work as separate layer for communication.

Or in other way we can say that its combination of

1) .Net Remoting

2) MSMQ

3) Web Services

4) COM +

Its basically provide Service.

The Mail dll for this is “System.ServiceModel.dll” and main Namespace Is ” System.ServiceModel”

In WCF there are 3 basic conceptual parts.

1) Services: – The Services are programs which respond to clients. They can send or receive Messages.

2) Client: – Client is that program which consume services the request for services. They either send messages or receive messages or both.

3) Intermediaries: – that’s server as bridge between client & services as shown in below fig.

 clip_image0012

2. What’s advantage?

Now as a human tendency you will think “Why?”  While we have Dot net Remotings, Web Services MSMQ, DCOM then why Microsoft introduces the “WCF” indigo.

So I will say that Microsoft Sees future. Now the era is For SOA (Service Oriented Architecture). So that’s the time demand to come with solid technology which can communicate Dot net to dot net application  + dot net to Other language Application too.

When you talking about dot net to dot net application then in that case Remoting is perfect.

But when you talking about dot net to other application Web Services is perfect. But when you talking about both the things at same time then?

At that time WCF is most perfect.

Now here if you go in deep Remoting use TCP/IP protocols for communication & web services stick with SOAP or http.

So Microsoft takes WCF in picture which is much flexible.

Other than that there are few more advantages

SOA: – Its provide Service Oriented Architecture. It provides developer to make just a simple Config base communication model.

 So just define your services and use those services according to you.

Interpretability: – WCF provide Interpretability. It integrates with other technologies also and gives great way to work with them.

Ws-* :- WCF follows Ws-* specification  which are define by Microsoft, SUN, IBM and many other big company together so that they can expose there services with common protocol.

3. Necessary component?

There are following WCF which are as below:-

1) Contract Definition: – A Service must have a service contact. It can contain multiple Service contract, Data Contract or operational contract.

2) End point Definition: – Address binding contract for binding necessary

3)  Hosting code: Some hosting code needed to create service & start services

In other word we can say service class also needed.

 

4. How it works?

To understand the WCF you have to learn ABC doesn’t laugh on it: D. Here ABC means Address Binding Contact.

 Here A- Address says where there is service or which services we have to contact.

        B- Binding says How to contact with services which ways we have to connect.

       C- Contract means what part of services which we have to access.

 clip_image002

We will study in detail in my next post with sample code.

So just wait for 2nd part of this till than

Thanks & Esteemed Regards

Rajat

Advertisements

2 thoughts on “WCF Windows Communication Foundation in 5 minutes Part 1

  1. Dear Friends,

    I hope you are doing well. I have launched a web site http://www.codegain.com and it is basically aimed C#,JAVA,VB.NET,ASP.NET,AJAX,Sql Server,Oracle,WPF,WCF and etc resources, programming help, articles, code snippet, video demonstrations and problems solving support. I would like to invite you as an author and a supporter. Looking forward to hearing from you and hope you will join with us soon.

    Please forward this email to all of your friends who are related IT. Send to us your feed about site also.

    Thank you
    RRaveen
    Founder CodeGain.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s