I finally started working on my WCF (Windows Communication Foundation) workshop that I will hopefully present in the Cutting Edge Club on 7th Nov.
I started by working on some virtual labs as well as some walkthroughs, as well as reading the MSDN documentation.
Here are some useful definitions:
1. What is WCF?
It is a unified programming model for building Service Oriented applications. Basically it is a ready made framework that helps the developer create a class/component without worrying about how other applications will communicate with this component.
2. How does WCF do this?
WCF separates the communication infrastructure from the business logic, by giving the developers a framework (set of classes) that allows them to expose their business classes with any supported protocol, or to write their own custom binding to support custom protocols.
3.What are the ABC’s fo a WCF Service ?
Address: Defines the Address of the service you want to expose.
Binding: Defines how people will consume this resource i.e. what protocol they will use to talk to this resource.
Contract: The service interface. This defines how people will call the service i.e. what are the methods? what are the parameters?
It is very important to stick to the interface when creating an application and the creator of the service has to make sure that the interface doesn’t change or the service consumers could have problems consuming the service, which is why the name contract is significant here.
4. Is a WCF service a fancy name for Web Service?
Actually, yes and no.
To be more precise, a Web Service is a type of WCF service that is hosted in IIS and communicates with consumers using HTTP. A WCF service is a super-set of that, it is any business class that is hosted as a service (can be hosted anywhere), and communicates with consumers with any protocol (the protocol is defined in a config file, you can even use multiple protocols).
5. How do I host a WCF service?
Well, you can host it in the pplication domain of any .NET application. Simply, you can use any application host (doesn’t have to be IIS), as long as it is a .NET application host. So far I have used a console application as a host for my WCF services.
Basically, A service is to a host as a DLL is to a Web or Windows application.
Well, thats just the start, stay tuned for some actual code writing very soon, and please comment.