WCF Articles

WCF – Windows Communication Foundation

WCF – Windows Communication Foundation

Introduction

.NET Framework 3.0 introduces four important features :
  • Windows Communication Foundation ( WCF )
  • Windows Presentation Foundation ( WPF )
  • Windows Workflow Foundation ( WWF )
  • Windows Card Space

WCF provides combined features of Web Services , Remoting , MSMQ and COM+ . It is used for building and deploying network distributed services.

WCF provides few important features. So lets discuss few difference and features which make it better than Webservices

Difference between Web Services and WCF

1. Hosting

Web Service can be hosted in IIS whereas WCF can be hosted in IIS , WAS and self hosting

2. Programming

Web Service Class requires [WebService] attribute whereas WCF requires [ServiceContract] attribute
Web Service method requires [WebMethod] attribute whereas WCF methods requires [OperationContract] attribute

3. Serialization

Web Service uses System.Xml.Serialization for serialization whereas WCF uses System.Runtime.Serialization for serialization.

4. Protocols

Web Service supports Security protocol whereas WCF supports Security , Reliable Messaging and Transaction protocols

5. Encoding

Web Service uses XML 1.0 , MTOM , DIME and Custom encoding whereas WCF uses XML 1.0 , MTOM , Binary and Custom encoding.

6. Transport

Web Service uses HTTP and TCP as transport protocols whereas WCF uses HTTP, TCP, Named Pipe , MSMQ and P2P as transport protocols.

WCF Endpoints

WCF Endpoints 
WCF Service can expose number of endpoints. Client communicates  with WCF Service using these endpoints. Endpoints consists of three parts :
Address – Address specifies where is the service
Binding – Binding specifies how to communicate with service
Contract – Contract specifies what functionalities or operations are exposed by service
Hence Endpoint is ABC ( A=Address , B=Binding, C=Contract )

Categories: WCF Articles, WCF Tutorial

Leave a Reply