Skip to Content
RESTful Web Services
book

RESTful Web Services

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

Chapter 11. Ajax Applications as REST Clients

Ajax applications have become very hot during the past couple of years. Significantly hotter, in fact, than even knowing what Ajax applications are. Fortunately, once you understand the themes of this book it’s easy to explain Ajax in those terms. At the risk of seeming old-fashioned, I’d like to present a formal definition of Ajax:

An Ajax application is a web service client that runs inside a web browser.

Does this make sense? Consider two examples widely accepted not to be Ajax applications: a JavaScript form validator and a Flash graphics demo. Both run inside the web browser, but they don’t make programmatic HTTP requests, so they’re not Ajax applications. On the flip side: the standalone clients I wrote in Chapters2 and 3 aren’t Ajax applications because they don’t run inside a web browser.

Now consider Gmail, a site that everyone agrees uses Ajax. If you log into Gmail you can watch your browser make background requests to the web service at mail.google.com, and update the web page you’re seeing with new data. That’s exactly what a web service client does. The Gmail web service has no public-facing name and is not intended for use by clients other than the Gmail web page, but it’s a web service nonetheless. Don’t believe it? There are libraries like libgmail that act as unofficial, non-Ajax clients to the Gmail web service. Remember, if it’s on the Web, it’s a web service.

This chapter covers client programming, and it picks up where ...

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