WCF Service Introduction
Windows Communication Foundation (WCF) is a next generation platform from Microsoft for service oriented architecture.
A service is a self-contained logical representation of a repeatable activity or function. Services can be combined by other software applications that together provide the complete functionality of a large software application.
The Windows Communication Foundation supports more protocols for transporting messages than the Web services, .Net remoting etc. Web services only support sending messages via the Hypertext Transfer Protocol (HTTP). Remoting supports message transfer via TCP.
In WCF Service, Interoperability (communication) between applications is the key point of consideration. Implement the service functionality once and configure the same service in very easy steps to support message transfer over various different protocols including HTTP, TCP, Named Pipes, MSMQ, IPC and even some custom protocols.
.NET remoting demands the service and consumer to be in .NET, which is major constraint for distributed enterprise applications. Even though Webservices provide application/language interoperability, it also has protocol limitations.
Prior to WCF, we need to write different types of service component modules to work over different protocols such as Webservices for HTTP, Remoting for TCP etc. WCF got introduced to addresses this issue and it is possible to write a WCF service logic once and configure the same service for any protocol/message transfer support. That means WCF alone can do what all of its predecessors components (COM,COM+,Remoting, Webservices etc.) can do.
One other great advantage of WCF over others is its support of duplex communication, both half duplex and full duplex. Webservices has only the capability of simplex mode of communication.
What Is Simplex, Half Duplex and Full Duplex Communication?
Salient features of WCF
1. Better interoperability and advanced protocol supports
2. Improved reliability and security
3. Better code reusability and configurability
4. Multiple Transports and Encodings
5. Multiple Message Patterns
6. Transaction supports
7. Durable Messages and Queued Messages
8. AJAX and REST Support
9. Can be hosted in different sorts of application types such as Console application, Winforms application, ASP.NET web applications, Windows services etc.