What is WCF? and what can it do?

@acidzombie24, to counter your comment to Ryan’s answer:

WCF is NOT a remote function call – not at all. Quite the contrary!

WCF is a message based communication system – your clients will have a proxy that has the same method as the server. When you call such a function on the client proxy, what the WCF runtime does is wrap up those method parameters, the method name, and some headers into a serialized message and it sends that to the server.

There is no constant connection like a remoting protocol or a database connection open at all times, between the client and the server. The client packages up a message and send it off. The transport media between client and server could even be SMTP (e-mail) !

Once the server receives the message, the WCF runtime will instantiate an instance of your service class to handle that request. The appropriate method on that service class will be called, the parameters are passed in, the service does its work, and the response is generated. The response then travels back the same way – serialized message across a transport media – to the client.

WCF is a general-purpose, message-based communication system to enable you to create distributed systems – you have a bunch of services somewhere on your servers, which offer up to perform certain functions on the client’s behalf, when they call. WCF is something like web services – only much more than that. It’s also message queueing (using Microsoft’s MSMQ product), net/TCP communication and a lot more. And it’s much more extensible than any communication API before.

Leave a Comment