Friday, 13 March 2015

WCF


What is WCF?

WCF stands for windows communication foundation. WCF is a feature which is made available by the Microsoft for building distributed and inter-operable applications.

Distributed applications:
--------------------------------
Distributed application is an application where parts of it run on more than one computer.In distributed applications some part of the application may reside on one system while other parts of application may reside on other systems.

For e.g:- A client machine of any user is accessing the web service of other third party which may be sitting miles away from the client machine.

Distributed systems provide the better scalablity for the applications, which means that the if a application is large enough to be reside on one machine than it can divided to different tiers. These tiers can be Presentation tier,business tier and data access tier.

Inter-operable applications
----------------------------------
Sometimes we have a client which may be running java on its client machine and our service may be built in .net platform then how will a java client will be able to access the .net service.
This is where an inter operable application comes in play. An inter operable application makes it possible for any platform to communicate with each other.

Why we use WCF?

Previously we were having web services to deploy the services but we need the separate technology like "remoting" if we want to deploy "tcp protocol", but Microsoft has eradicated that headache of learning separate technology. You can now do all the service stuff by using WCF only.

for e.g:- if you have 2 clients and if one client wants to access your service by using the following format:-
-HTTP PROTOCOL WITH XML MESSAGE FORMAT

and there is 2nd client who wants to access your service by using the following format:-
TCP PROTOCOL WITH BINARY MESSAGE

then instead of making the remoting services for 2nd client, we can just use the same wcf service by adding the 2nd endpoint for the 2nd client.

In the endpoint configuration, we can specify the format of messages and protocols

With this we are having only single service and this service ,we can deploy multiple endpoints for multiple clients.





No comments:

Post a Comment