Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are "web services"?

Tags:

.net

service

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?

like image 716
Kevin Avatar asked Feb 15 '26 14:02

Kevin


2 Answers

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.

like image 67
John Weldon Avatar answered Feb 20 '26 16:02

John Weldon


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:

  • Twitter
  • Facebook
  • FriendFeed

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.

like image 28
lomaxx Avatar answered Feb 20 '26 14:02

lomaxx