web analytics
WCF Tutorials Introduction By Rojan

WCF Tutorials Introduction By Rojan

In This Article you will learn WCF or Windows Communication Foundation.

  • What is WCF?
  • Why should we use WCF?
  • What is distributed application?
  • Why build distributed application?
  • What is an interoperable application?

What is WCF?

WCF stands for Windows Communication Foundation node is part of .NET 3.0, Also is Microsoft platform for building distributed and interoperable applications.

What is a Distributed Application?

In simple terms a distributed application is an application where parts of it run on 2 or more computer nodes.

Distributed applications are also called as connected system.

WCF-Tutorials1-Rojan

Example 2:

An Enterprise web application may have the following tiers, and each tier may be running on a different machine.

The reason why is to scalability of the application.

As the users are increasing you need more hardware and split the jobs into different machines, and instead of running on one machine it will be running on different machines to serve more users without any crashes and speed up the process and accessibility.

  1. Presentation tier
  2. Business tier
  3. Data Access tier

WCF-Tutorials-Rojan-2

Why Build Distributed Application?

  1. An enterprise application may need to use the service provided by other enterprise.For example: the e-commerce application may uses PayPal service for their method of payments. Then in this case they are using another enterprise services inside their own application. Then those two applications are communication and connection to provide a better services in a secure basis.
  2. For better scalability: An enterprise web application may have a presentation tier, business tier, and data access tier, and each individual application may be running on a different machine.

What Is an Interoperable Application?

An application that can communicate with any other application that is built on any platform is called as an inter-operable application.

Web services are inter-operable, where as .NET remoting services are not.

Web services can communicate with any application built on any platform, where as a .NET remoting service can be consumed only by another .net application.

We know that all the web services are interoperable because they use open protocol and massage format, web service uses http protocole and xml massage format. Any application and platform can understand those two protocol systems.

What technology choices did we have before WCF to build distributed application?

  • Enterprise Services
  • Dot Net Remoting
  • Web Services

Web Services are interoperable because they are using the open protocl and message formatting system.

But .Net Remoting is not interoperable, in this case the both Client and the web services should both uses .Net in order to be able to communicate.

Why Should We use WCF?

For Example: We have 2 clients and we need to implement a service a for both of them.

1- The first client is using Java application to interact with our service, so for interoperability this client wants messages to be in XML format and the protocol to be HTTP.

WCF-Tutorials-3-Rojan

2- The second Client is looking for the messages formatted in binary over TCP protocol.

In this case the developer should know how to do both technology in order to satisfy the clients need.

Web Services and Dot Net Remoting are tow different technologies with completely different programming models.

Microsoft had to do some implementation to resolve this issue and the new way of communication between those two protocols.

So, Microsoft decided to bring all these communication technologies under the same roof and that single programming model is called WCF-Windows Communication Foundation.

WCF-Tutorials-4-Rojan

WCF-Windows Communication Foundation

By using WCF-Windows communication foundation the we can choose the protocols and message communication format that we want to use.

As per you can see in the below image both protocol formats (HTTP protocol over XML message format) and (TCP Protocol over Binary message format) are able to communicate with the WCF Service.

Let say if another client wants to implement an XML message format over a TCP Protocol then you need to configure another end point.

So, basically based on our clients requirement we are configuring different end points.

WCF-Tutorials-5-Rojan

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.