tags:

views:

132

answers:

5

I'm reading a book about programming ASP.NET in C#. The book makes the following comment:

Previous editions of this book tackled web services, a feature that allows you to create code routines that can be called by other applications over the Internet.Web services are more interesting when considering rich client development (because they allow you to give web features to ordinary desktop applications),and they’re in the process of being replaced by a new technology known as WCF (Windows Communication Foundation). For those reasons, web services aren’t covered in this book.However,if you want to branch out and explore the web service world,you can download the web service chapters from the previous edition of this book from the book’s download page.The information in these chapters still applies to ASP.NET 3.5,because the web service feature hasn’t changed.

Can someone offer, in "layman's terms" what exactly a web service is and if, indeed, they are being replaced, at least in .Net, with WCF? What would be a practical example of a web service? Are they stand alone programs that run on a web server and are invoked by a client or clients?

+1  A: 

Web services are services offered on the web that applications can access.

A thermometer application running on your cellphone for instance could retrieve the local temperature from a meteorologic web service.

Alexandre Jasmin
+3  A: 

Web Services, at a high level, are just like applications that run over the web. However there are a number of fairly sophisticated protocols and methods that constitute main-stream webservices:

  1. SOAP (another link) and WSDL (another link) are the two grand-daddy acronyms that are significant in webservices, and they get a lot of press.
  2. REST, and JSON are two other acronyms that are pretty important when thinking about webservices...
  3. HTTP and TCP protocols are two of the most common transports that most webservices run on.

WCF is another layer of sophistication on these protocols and formats that Microsoft introduced. WCF gives flexible, configurable, debuggable infrastructure (plus much more) for writing and using web-services.

John Weldon
Thanks for that info, John. I actually looked up "web services" on google and the first article I found talks about SOAP and WSDL. I'm still not clear, though, on what a good example of a web service would be. For instance, I'm assuming that Amazon.com uses web services. What would be an example of one of their web services? An API that would let you retrieve book information by sending an ISBN?
Kevin
Yes, that would be a good example. Even RSS feeds (and technically web pages) could be considered web services too.
John Weldon
If you want a good idea of a web service, check out the CO-OPS web services. You can request tide predictions and other neat oceanic data and do neat stuff with it. http://opendap.co-ops.nos.noaa.gov/axis/
echo
+2  A: 

It's basically a way of exposing an API over HTTP using a standard protocol. Currently the 2 major protocols are SOAP and REST based services.

If you want to go in depth, the wikipedia article on web services pretty much covers all the major points.

Most major web sites provide some sort of web service API for interacting with it's data. Some examples are:

The reason for the thousand and one books on Amazon is that whilst the concept is fairly simple to understand, implementing services aren't as simple as you might think and the books talk more about the best practices when it comes to implementing web services.

lomaxx
Can we really call REST a protocol?
Alexandre Jasmin
+1  A: 

The way I like to think about it, Web Service is a program on a web server, to which you can pass data and receive data all through web. For example there can be a web service that provides weather information for a given zip code... but not in a way that website presents you but in more abstract way... so that 1000s different websites can request information over the web then display that data in their own way or use for some other purpose.

m0s
A: 

But don't we have CORBA, RMI like stuff for doing this? Those may not be using HTTP. But why should that be important?

Reddy