Pages

Thursday, June 27, 2013

Introduction to WCF


Windows Communication Foundation (WCF) is Microsoft’s unified programming model for building service-oriented applications. It enables developers to build secure, reliable, transacted solutions that integrate across platforms and interoperate with existing investments. We achieve SOA (Service Oriented Architecture) using WCF.

The main advantage of using WCF is that it doesn’t matter which language is used for client. If both client and server are built in the same language say C# then we could use remoting. Otherwise if the client is in Java and the services is in .net then we should use WCF. There are other advantages like the code reusability, scalability. For example I build a WCF service for the code which used commonly by most of the applications like say an employee information is commonly accessed by all the applications in an organization. Hence the operations like accessing the data, adding the employee data, deleting and updating would be made as a WCF service and all the applications can access this service. The code was reused which helps to reduce the coding effort and the cost in development.
Let’s see the ABCs of WCF .Every now and then we hear this when we talk about WCF. So what’s this ABC?

•       Address: The address is nothing but the URL and port where you can find the service. So it’s like you go to this address and this pin code you will find the service.

e.g. http://localhost:3753/Calculator/service

•       Binding: The binding consists of information which will be useful to the clients.

E.g. of bindings: - basichttpbinding, WSHttpbinding

•       Contract: A contract is nothing but an understanding between the client and the service that this is the way I send the messages and this is what you will respond with.

e.g.:- ICalculatorService

Now, that we understand the ABCs of a WCF. Together these are called as Endpoints.

No comments:

Post a Comment