When an Interviewer comes on Topic WCF with you, it is much obvious his First Question would be What is WCF? Why we use WCF over Web Service? What are the differences between two?
WCF (Windows Communication Foundation) is a programming platform for building, configuring and deploying network - distributed services. Interoperability is the Fundamental Characteristics of WCF. It is a combined feature of Web Services, .NET Remoting, MSMQ and COM+.
Difference Between WCF and Web Service
Happy Coding !!!
WCF (Windows Communication Foundation) is a programming platform for building, configuring and deploying network - distributed services. Interoperability is the Fundamental Characteristics of WCF. It is a combined feature of Web Services, .NET Remoting, MSMQ and COM+.
Difference Between WCF and Web Service
| FEATURES | WEB SERVICE | WCF |
|---|---|---|
| Hosting | It can be hosted in IIS | It can be hosted in IIS, windows activation service, Self-hosting, Windows service |
| Programming | [WebService] attribute has to be added to the class | [ServiceContraact] attribute has to be added to the class |
| Model | [WebMethod] attribute represents the method exposed to the client | [OperationContract] attribute represents the method exposed to the client |
| Operation | One-way, Request-Response are the different operations supported in web service | One-Way, Request-Response, Duplex are a different type of operations supported in WCF |
| XML | System.Xml.serialization namespace is used for serialization | System.Runtime.Serialization namespace is used for serialization |
| Encoding | XML 1.0, MTOM(Message Transmission Optimization Mechanism), DIME, Custom | XML 1.0, MTOM, Binary, Custom |
| Transports | Can be accessed through HTTP, TCP, Custom | Can be accessed through HTTP, TCP, Named pipes, MSMQ, P2P, Custom |
| Protocols | Security | Security, Reliable messaging, Transactions |
Happy Coding !!!
No comments:
Post a Comment