Skip to Content
RESTful Web Services
book

RESTful Web Services

by Leonard Richardson, Sam Ruby
May 2007
Intermediate to advanced content levelIntermediate to advanced
446 pages
14h 31m
English
O'Reilly Media, Inc.
Content preview from RESTful Web Services

Chapter 5. Designing Read-Only Resource-Oriented Services

We’ve got some information we want to expose to people elsewhere on the network. We want to reach the widest possible combination of clients. Every programming language has an HTTP library, so the natural choice is to expose the data over HTTP. Every programming language has an XML parsing library, so we can format the data with XML and always be understood. Whee!

Sometimes that’s as far as the train of thought goes. The solution is obvious, so the programmers set to work. Despite its vagueness, this technique gives surprisingly good results. Most people are intuitively familiar with what makes a good web site, and a good web service works much the same way.

Unfortunately, this gut-feeling approach combines everyone’s gut feelings into a stew of web services that are usually not RESTful (they’re REST-RPC hybrids), and which work alike only in superficial ways. If you understand why REST works, you can make your services safer, easier to use, and accessible through standard tools.

Some “web services” were never intended to be used as such, and have RESTful qualities seemingly by accident. Into this category fall the many well-designed web sites that have been screen-scraped over the years. So do many providers of images: for instance, the static map tiles served up to the Google Maps application, where you change the URI to address a different part of the Earth. An amusing example is Amazon product images, which can be manipulated ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

RESTful Web Services Cookbook

RESTful Web Services Cookbook

Subbu Allamaraju
RESTful Java Web Services - Third Edition

RESTful Java Web Services - Third Edition

Balachandar Bogunuva Mohanram

Publisher Resources

ISBN: 9780596529260Supplemental ContentErrata Page