So, what’s the difference between a website and a web service?
A lot of people have been asking this question.
It’s actually quite simple: A web service is a web application that is not accessed interactively by a human, but rather by a program.
An alternative to using a browser interactively.
To make use of a website, we load a URL into a browser and visit the site. Once we’re there, we might – even if we don’t realize it – be operating a very sophisticated application, like Amazon. We can search their inventory – which sits inside a very large database – via Amazon’s search form.
Using a programatic interface.
But there’s something else you can do with Amazon. We can access their inventory via a web service. Or more precisely, we can build programs that can access their inventory by communicating with programs (called web services) that they have provided. Our programs and their programs talk to each other directly.
More powerful access.
These services can be used to do things that would usually would be very time-consuming, and in fact, often intractable, if performed with a browser. Their web services also allow third party vendors to post their stock on Amazon, and in return for a fee, let Amazon sell and ship their products.
The way a web service works is by the provider of the service (such as Amazon) making the interface to the software that implements the service publicly accessible over the Internet. Such an interface is called an Application Programming Interface, or API. This way, anyone who wants to write a program that will access the service over the web knows exactly how to write their program to talk to the web service. These programs that access web services are called “client” applications.
There is a wide class of web services available on the Internet, and many of them provide APIs that allow programmers to write software that can access vast databases of such things as news and real estate information.
We will come back to this.