Chapter 16. Web Services

The information you publish in web pages is meant to be seen and read, and the forms on those pages are meant to be filled in by hand. When designing your web pages, you use design elements such as layout, fonts, and color that make your website visually appealing to people. However, the information and services your website provides may also be useful to other website applications.

A web service is web-based functionality that you access using the protocols of the Web, but it is designed to be easy to use by programs. Unlike web pages, web services are not meant to be accessed in a browser or look good to people.

For example, most search engines are capable of limiting their searches to a single site. If you could call a search engine’s functionality like a function, you could easily add search functionality to your own site. However, if there is no standard way to access this behavior, you will need to write this functionality yourself, or you will need to try to access the pages with code that acts like a browser or with screen scraping. Since the pages are meant for people to read and not for programs to use, you cannot be guaranteed that data in a page will be easy to parse, or even that it will remain the same.

The goal of web services is to create web-based applications that interact with other applications with no user interface. If you’re a web page developer, having such web services can make your data or site functionality available to other sites ...

Get Programming ASP.NET 3.5, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.