Book description
"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
Publisher resources
Table of contents
- Dedication
- A Note Regarding Supplemental Files
- Foreword
- Preface
- 1. The Programmable Web and Its Inhabitants
- 2. Writing Web Service Clients
- 3. What Makes RESTful Services Different?
- 4. The Resource-Oriented Architecture
- 5. Designing Read-Only Resource-Oriented Services
-
6. Designing Read/Write Resource-Oriented Services
-
User Accounts as Resources
- Why Should User Accounts Be Resources?
- Authentication, Authorization, Privacy, and Trust
- Turning Requirements into Read/Write Resources
- Figure Out the Data Set
- Split the Data Set into Resources
- Name the Resources with URIs
- Expose a Subset of the Uniform Interface
- Design the Representation(s) Accepted from the Client
- Design the Representation(s) to Be Served to the Client
- Link This Resource to Existing Resources
- What’s Supposed to Happen?
- What Might Go Wrong?
-
Custom Places
- Figure Out the Data Set
- Split the Data Set into Resources
- Name the Resources with URIs
- Expose a Subset of the Uniform Interface
- Design the Representation(s) Accepted from the Client
- Design the Representation(s) Served to the Client
- Link This Resource to Existing Resources
- What’s Supposed to Happen?
- What Might Go Wrong?
- A Look Back at the Map Service
-
User Accounts as Resources
-
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?
-
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?
- 9. The Building Blocks of Services
- 10. The Resource-Oriented Architecture Versus Big Web Services
- 11. Ajax Applications as REST Clients
- 12. Frameworks for RESTful Services
- A. Some Resources for REST and Some RESTful Resources
-
B. The HTTP Response Code Top 42
- Three to Seven Status Codes: The Bare Minimum
- 1xx: Meta
- 2xx: Success
- 3xx: Redirection
-
4xx: Client-Side Error
- 400 (“Bad Request”)
- 401 (“Unauthorized”)
- 402 (“Payment Required”)
- 403 (“Forbidden”)
- 404 (“Not Found”)
- 405 (“Method Not Allowed”)
- 406 (“Not Acceptable”)
- 407 (“Proxy Authentication Required”)
- 408 (“Request Timeout”)
- 409 (“Conflict”)
- 410 (“Gone”)
- 411 (“Length Required”)
- 412 (“Precondition Failed”)
- 413 (“Request Entity Too Large”)
- 414 (“Request-URI Too Long”)
- 415 (“Unsupported Media Type”)
- 416 (“Requested Range Not Satisfiable”)
- 417 (“Expectation Failed”)
- 5xx: Server-Side Error
-
C. The HTTP Header Top Infinity
-
Standard Headers
- Accept
- Accept-Charset
- Accept-Encoding
- Accept-Language
- Accept-Ranges
- Age
- Allow
- Authorization
- Cache-Control
- Connection
- Content-Encoding
- Content-Language
- Content-Length
- Content-Location
- Content-MD5
- Content-Range
- Content-Type
- Date
- ETag
- Expect
- Expires
- From
- Host
- If-Match
- If-Modified-Since
- If-None-Match
- If-Range
- If-Unmodified-Since
- Last-Modified
- Location
- Max-Forwards
- Pragma
- Proxy-Authenticate
- Proxy-Authorization
- Range
- Referer
- Retry-After
- TE
- Trailer
- Transfer-Encoding
- Upgrade
- User-Agent
- Vary
- Via
- Warning
- WWW-Authenticate
- Nonstandard Headers
-
Standard Headers
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: RESTful Web Services
- Author(s):
- Release date: May 2007
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596529260
You might also like
book
RESTful Web Services Cookbook
While the REST design philosophy has captured the imagination of web and enterprise developers alike, using …
book
RESTful Java Web Services - Third Edition
Master core REST concepts and create RESTful web services in Java About This Book Build efficient …
book
RESTful Java with JAX-RS
Learn how to design and develop distributed web services in Java using RESTful architectural principals and …
book
Web Services Essentials
As a developer new to Web Services, how do you make sense of thisemerging framework so …