Merits Of WCF Over Web Service And .NET Remoting Service

Introduction

WCF is defined as Windows Communication Foundation and is a part of .NET 3.0 framework.

Difference Between Web services & .NET remoting service

Web services can communicate with any application built on any platform, whereas a .NET remoting service can be consumed only by a .net application.

  • A web service to exchange messages in XML format using HTTP protocol for interoperability.
  • A remoting service to exchange messages in binary format using TCP protocol for performance.
Real Time Example For Better Understanding about Merits Of Wcf Over Web Service and .Net Remoting Service

We have 2 customers and we need to build a service for them.
  1. The first customer is using a PHP application to interact with our service, so for interoperability requirement this customer is messaged in XML format and the protocol is HTTP.
  2.  The second customers uses .NET, so for better performance the requirement of this customer is to be messaged in binary format and the protocol is TCP protocol.

You implement one service and we can configure as many end points as want to support all the customers needs.
To support the above 2 customer requirements, we would configure 2 end points. In the endpoint configuration we can specify the protocols and message formats that we want to use.

WCF = WEB SERVICES + .NET REMOTING SERVICES.

If we don't use Wcf for those two clients then for the first client we should use WEB SERVICES that is ASMX web service.

For the second client we should use .NET REMOTING SERVICES.

So to unify and bring all these technologies under a single part , Microsoft has introduced  a single programming model that is called as WCF - Windows Communication Foundation.

The Developer's work is minimized and becomes less time consuming. 

Services based on different Transport Protocols and Message Formats.

So, we should use a single WCF Service and configure different end points to support different transport protocols and message formats.

Important Real-Time Points For .Net Remoting Service & Web Service

We can use .NET Remoting to build a Web service

The client can consume a .NET Remoting web service even if they don't have a .Net platform
but we need to be very careful in choosing the data types that we use in the service, and client-activated objects and events should be avoided.

.NET Remoting is never used for implementing interoperable services.

To build interoperable services use ASP.NET Web Services.

SUMMARY
  1. Merits and Demerits of .net Remoting Service & Web Service.
  2. Merits of WCF over .net Remoting Service & Web Service.
  3. Real time example to represent Merits of WCF over .net Remoting Service & Web Service.
  4. Real time notes while developing interoperable things.
Next Recommended Reading WCF And WCF Service Components