CARVIEW |
RESTful Web Services
Web services for the real world
- By
- Leonard Richardson, Sam Ruby
- Publisher:
- O'Reilly Media
- Released:
- May 2007
- Pages:
- 448
You've built web sites that can be used by humans. But can you also build web sites that are usable by machines? That's where the future lies, and that's what this book shows you how to do. Today's web service technologies have lost sight of the simplicity that made the Web successful. This book explains how to put the "Web" back into web services with REST, the architectural style that drives the Web.
"Every developer working with the Web needs to read this book."
-- David Heinemeier Hansson, creator of the Rails framework
"RESTful Web Services finally provides a practical roadmap for constructing services that embrace the Web, instead of trying to route around it."
-- Adam Trachtenberg, PHP author and EBay Web Services Evangelist
You've built web sites that can be used by humans. But can you also build web sites that are usable by machines? That's where the future lies, and that's what RESTful Web Services shows you how to do. The World Wide Web is the most popular distributed application in history, and Web services and mashups have turned it into a powerful distributed computing platform. But today's web service technologies have lost sight of the simplicity that made the Web successful. They don't work like the Web, and they're missing out on its advantages.
This book puts the "Web" back into web services. It shows how you can connect to the programmable web with the technologies you already use every day. The key is REST, the architectural style that drives the Web. This book:
- Emphasizes the power of basic Web technologies -- the HTTP application protocol, the URI naming standard, and the XML markup language
- Introduces the Resource-Oriented Architecture (ROA), a common-sense set of rules for designing RESTful web services
- Shows how a RESTful design is simpler, more versatile, and more scalable than a design based on Remote Procedure Calls (RPC)
- Includes real-world examples of RESTful web services, like Amazon's Simple Storage Service and the Atom Publishing Protocol
- Discusses web service clients for popular programming languages
- Shows how to implement RESTful services in three popular frameworks -- Ruby on Rails, Restlet (for Java), and Django (for Python)
- Focuses on practical issues: how to design and implement RESTful web services and clients
-
Chapter 1 The Programmable Web and Its Inhabitants
-
Kinds of Things on the Programmable Web
-
HTTP: Documents in Envelopes
-
Method Information
-
Scoping Information
-
The Competing Architectures
-
Technologies on the Programmable Web
-
Leftover Terminology
-
-
Chapter 2 Writing Web Service Clients
-
Web Services Are Web Sites
-
del.icio.us: The Sample Application
-
Making the Request: HTTP Libraries
-
Processing the Response: XML Parsers
-
JSON Parsers: Handling Serialized Data
-
Clients Made Easy with WADL
-
-
Chapter 3 What Makes RESTful Services Different?
-
Introducing the Simple Storage Service
-
Object-Oriented Design of S3
-
Resources
-
HTTP Response Codes
-
An S3 Client
-
Request Signing and Access Control
-
Using the S3 Client Library
-
Clients Made Transparent with ActiveResource
-
Parting Words
-
-
Chapter 4 The Resource-Oriented Architecture
-
Resource-Oriented What Now?
-
What’s a Resource?
-
URIs
-
Addressability
-
Statelessness
-
Representations
-
Links and Connectedness
-
The Uniform Interface
-
That’s It!
-
-
Chapter 5 Designing Read-Only Resource-Oriented Services
-
Resource Design
-
Turning Requirements Into Read-Only Resources
-
Figure Out the Data Set
-
Split the Data Set into Resources
-
Name the Resources
-
Design Your Representations
-
Link the Resources to Each Other
-
The HTTP Response
-
Conclusion
-
-
Chapter 6 Designing Read/Write Resource-Oriented Services
-
User Accounts as Resources
-
Custom Places
-
A Look Back at the Map Service
-
-
Chapter 7 A Service Implementation
-
A Social Bookmarking Web Service
-
Figuring Out the Data Set
-
Resource Design
-
Design the Representation(s) Accepted from the Client
-
Design the Representation(s) Served to the Client
-
Connect Resources to Each Other
-
What’s Supposed to Happen?
-
What Might Go Wrong?
-
Controller Code
-
Model Code
-
What Does the Client Need to Know?
-
-
Chapter 8 REST and ROA Best Practices
-
Resource-Oriented Basics
-
The Generic ROA Procedure
-
Addressability
-
State and Statelessness
-
Connectedness
-
The Uniform Interface
-
This Stuff Matters
-
Resource Design
-
URI Design
-
Outgoing Representations
-
Incoming Representations
-
Service Versioning
-
Permanent URIs Versus Readable URIs
-
Standard Features of HTTP
-
Faking PUT and DELETE
-
The Trouble with Cookies
-
Why Should a User Trust the HTTP Client?
-
-
Chapter 9 The Building Blocks of Services
-
Representation Formats
-
Prepackaged Control Flows
-
Hypermedia Technologies
-
-
Chapter 10 The Resource-Oriented Architecture Versus Big Web Services
-
What Problems Are Big Web Services Trying to Solve?
-
SOAP
-
WSDL
-
UDDI
-
Security
-
Reliable Messaging
-
Transactions
-
BPEL, ESB, and SOA
-
Conclusion
-
-
Chapter 11 Ajax Applications as REST Clients
-
From AJAX to Ajax
-
The Ajax Architecture
-
A del.icio.us Example
-
The Advantages of Ajax
-
The Disadvantages of Ajax
-
REST Goes Better
-
Making the Request
-
Handling the Response
-
JSON
-
Don’t Bogart the Benefits of REST
-
Cross-Browser Issues and Ajax Libraries
-
Subverting the Browser Security Model
-
-
Chapter 12 Frameworks for RESTful Services
-
Ruby on Rails
-
Restlet
-
Django
-
-
Appendix Some Resources for REST and Some RESTful Resources
-
Standards and Guides
-
Services You Can Use
-
-
Appendix The HTTP Response Code Top 42
-
Three to Seven Status Codes: The Bare Minimum
-
1xx: Meta
-
2xx: Success
-
3xx: Redirection
-
4xx: Client-Side Error
-
5xx: Server-Side Error
-
-
Appendix The HTTP Header Top Infinity
-
Standard Headers
-
Nonstandard Headers
-
-
Colophon

- Title:
- RESTful Web Services
- By:
- Leonard Richardson, Sam Ruby
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- May 2007
- Ebook Release:
- December 2008
- Pages:
- 448
- Print ISBN:
- 978-0-596-52926-0
- | ISBN 10:
- 0-596-52926-0
- Ebook ISBN:
- 978-0-596-15835-4
- | ISBN 10:
- 0-596-15835-1
-
Leonard Richardson
Leonard Richardson (https://www.crummy.com/) is the author of the Ruby Cookbook (O'Reilly) and of several open source libraries, including Beautiful Soup. A California native, he currently lives in New York.
-
Sam Ruby
Sam Ruby is a prominent software developer who has made significant contributions to the many of the Apache Software Foundation's open source projects, and to the standardization of web feeds via his involvement with the Atom web feed standard and the popular Feed Validator web service.
He currently holds a Senior Technical Staff Member position in the Emerging Technologies Group of IBM. He resides in Raleigh, North Carolina.
The animal on the cover of RESTful Web Services is a vulpine phalanger (P. vulpina). Phalanger is the general term given to animals of the Phalangeridae family, which includes possums and cuscuses. (One should not confuse the Australian possum with the American opossum; they are both marsupials, but very different.) The term phalanger is derived from the Greek word phalanges, which means finger or toe bone. The omnivorous phalanger uses its claw-fingered paws (with opposable thumbs) to climb, hunt, and live in trees. Phalangers are found in the forests of Australia, New Zealand, Tasmania, and some Indonesian islands. Like the most famous marsupial, the kangaroo, female phalangers carry their young around in a front pouch after birth.
Phalanger is also the name of a PHP complier project for the .NET framework.
![]() ©2010, O'Reilly Media, Inc. (707) 827-7000 / (800) 998-9938 All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. |
About O'Reilly
Academic Solutions Authors Contacts Customer Service Jobs Newsletters O'Reilly Labs Press Room Privacy Policy RSS Feeds Terms of Service User Groups Writing for O'Reilly |
Content Archive Business Technology Computer Technology Microsoft Mobile Network Operating System Digital Photography Programming Software Web Web Design |
More O'Reilly Sites
O'Reilly Radar Ignite Tools of Change for Publishing Digital Media Inside iPhone makezine.com craftzine.com hackszine.com perl.com xml.com Partner Sites InsideRIA java.net O'Reilly Insights on Forbes.com |