Tom Cox  

ASP.NET Web Services vs. WCF Services

Posted by Tom Cox
Friday, December 11, 2009

The term “web service” is similar to the term “cloud computing” in
that it’s pretty vague, and it can mean different things to different
people. So when I hear someone say we need a “web service that does
x”, I immediately start asking a few clarifying questions:

Is the individual referring to the traditional “.asmx” web service
or the WCF “.svc” web service?

Will it implement a SOAP or a REST architecture?

Is it really a web (http) service or some other type of
communication service, such as a named pipe communication, a tcp
communication, or a MSMQ messaging queue communication?

The answers to these questions help determine whether a web service, a
WCF service, (or something else), should be utilized.
In the next few paragraphs I’ll differentiate a web service from a WCF
service and point you to a nice link that further summarizes the
differences.

The key thing to understand about ASP.NET Web Services and WCF
Services is that they are very similar in implementation and concept,
but that there are some key differences to be aware of.
Both technologies define contracts for passing xml data and both
technologies can leverage SOAP and WSDL concepts and work over the
http protocol.

That’s where many of the similarities end. Windows Communication
Foundation, as its name implies, supports many types of communication
between disparate machines (or between processes on the same machine).
This may seem obvious, but it was especially eye opening to me as I
first used WCF for tcp communication and, later, worked my way
backwards to use it for http web service purposes.

ASP.NET Web Services were Microsoft's first attempts at building
service oriented concepts into the ASP.NET platform.
The core library for ASP.NET Web Services is the XMLSerializer.
Since there are other formats for exchanging data, such as POX and
JSON, WCF’s DataContractSerializer is expanded to accept these types
of data as well.

WCF Services came along after ASP.NET Web Services and it looks to me
like Microsoft saw the value in a service oriented architecture, but
saw some flaws in how ASP.NET Web Services were built.
It appears that they wanted to make sweeping improvements to their
service oriented architecture without breaking the existing code base,
so they built upon the concepts of ASP.NET Web Services, but on a new
platform.

I see this platform as a communication standard launching point for
the next decade, and look forward to the technological innovations
that it will spawn.

The following blog post by Kalyan Bandarupalli goes into more detail
about the specific differences between ASP.NET Web Services and WCF
Services:
http://www.techbubbles.com/wcf/wcf-vs-aspnet-web-services

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home