WCF – Windows Communication Foundation
- 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
Web Service can be hosted in IIS whereas WCF can be hosted in IIS , WAS and self hosting
Web Service Class requires [WebService] attribute whereas WCF requires [ServiceContract] attribute
Web Service method requires [WebMethod] attribute whereas WCF methods requires [OperationContract] attribute
Web Service uses System.Xml.Serialization for serialization whereas WCF uses System.Runtime.Serialization for serialization.
Web Service supports Security protocol whereas WCF supports Security , Reliable Messaging and Transaction protocols
Web Service uses XML 1.0 , MTOM , DIME and Custom encoding whereas WCF uses XML 1.0 , MTOM , Binary and Custom encoding.
Web Service uses HTTP and TCP as transport protocols whereas WCF uses HTTP, TCP, Named Pipe , MSMQ and P2P as transport protocols.