RESTful Web Services Cookbook: Solutions for Improving Scalability and Simplicity [NOOK Book]

Overview

While the REST design philosophy has captured the imagination of web and enterprise developers alike, using this approach to develop real web services is no picnic. This cookbook includes more than 100 recipes to help you take advantage of REST, HTTP, and the infrastructure of the Web. You'll learn ways to design RESTful web services for client and server applications that meet performance, scalability, reliability, and security goals, no matter what programming language and ...

See more details below
RESTful Web Services Cookbook: Solutions for Improving Scalability and Simplicity

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$17.99
BN.com price
(Save 43%)$31.99 List Price

Overview

While the REST design philosophy has captured the imagination of web and enterprise developers alike, using this approach to develop real web services is no picnic. This cookbook includes more than 100 recipes to help you take advantage of REST, HTTP, and the infrastructure of the Web. You'll learn ways to design RESTful web services for client and server applications that meet performance, scalability, reliability, and security goals, no matter what programming language and development framework you use.

Each recipe includes one or two problem statements, with easy-to-follow, step-by-step instructions for solving them, as well as examples using HTTP requests and responses, and XML, JSON, and Atom snippets. You'll also get implementation guidelines, and a discussion of the pros, cons, and trade-offs that come with each solution.

  • Learn how to design resources to meet various application scenarios
  • Successfully design representations and URIs
  • Implement the hypertext constraint using links and link headers
  • Understand when and how to use Atom and AtomPub
  • Know what and what not to do to support caching
  • Learn how to implement concurrency control
  • Deal with advanced use cases involving copying, merging, transactions, batch processing, and partial updates
  • Secure web services and support OAuth
Read More Show Less

Product Details

  • ISBN-13: 9781449388843
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 2/22/2010
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 1
  • Pages: 316
  • Sales rank: 786,379
  • File size: 3 MB

Meet the Author

Subbu Allamaraju is a Principal Engineer at Yahoo! where, during the last one year, he has been developing standards and practices for designing RESTful Web APIs. Prior to that Subbu developed web services/Java based software and contributed to JCP and OASIS standards at BEA Systems Inc. Subbu has contributed to four books on J2EE, all published by Wrox. For a complete list of his works, and writings, see http://www.subbu.org/about.

Read More Show Less

Table of Contents

Preface;
Scope of the Book;
Companion Material;
How This Book Is Organized;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgments;
Mike Amundsen’s Contribution;
Chapter 1: Using the Uniform Interface;
1.1 How to Keep Interactions Visible;
1.2 When to Trade Visibility;
1.3 How to Maintain Application State;
1.4 How to Implement Safe and Idempotent Methods on the Server;
1.5 How to Treat Safe and Idempotent Methods in Clients;
1.6 When to Use GET;
1.7 When to Use POST;
1.8 How to Create Resources Using POST;
1.9 When to Use PUT to Create New Resources;
1.10 How to Use POST for Asynchronous Tasks;
1.11 How to Use DELETE for Asynchronous Deletion;
1.12 When to Use Custom HTTP Methods;
1.13 When and How to Use Custom HTTP Headers;
Chapter 2: Identifying Resources;
2.1 How to Identify Resources from Domain Nouns;
2.2 How to Choose Resource Granularity;
2.3 How to Organize Resources into Collections;
2.4 When to Combine Resources into Composites;
2.5 How to Support Computing/Processing Functions;
2.6 When and How to Use Controllers to Operate on Resources;
Chapter 3: Designing Representations;
3.1 How to Use Entity Headers to Annotate Representations;
3.2 How to Interpret Entity Headers;
3.3 How to Avoid Character Encoding Mismatch;
3.4 How to Choose a Representation Format and a Media Type;
3.5 How to Design XML Representations;
3.6 How to Design JSON Representations;
3.7 How to Design Representations of Collections;
3.8 How to Keep Collections Homogeneous;
3.9 How to Use Portable Data Formats in Representations;
3.10 When to Use Entity Identifiers;
3.11 How to Encode Binary Data in Representations;
3.12 When and How to Serve HTML Representations;
3.13 How to Return Errors;
3.14 How to Treat Errors in Clients;
Chapter 4: Designing URIs;
4.1 How to Design URIs;
4.2 How to Use URIs As Opaque Identifiers;
4.3 How to Let Clients Treat URIs As Opaque Identifiers;
4.4 How to Keep URIs Cool;
Chapter 5: Web Linking;
5.1 How to Use Links in XML Representations;
5.2 How to Use Links in JSON Representations;
5.3 When and How to Use Link Headers;
5.4 How to Assign Link Relation Types;
5.5 How to Use Links to Manage Application Flow;
5.6 How to Deal with Ephemeral URIs;
5.7 When and How to Use URI Templates;
5.8 How to Use Links in Clients;
Chapter 6: Atom and AtomPub;
6.1 How to Model Resources Using Atom;
6.2 When to Use Atom;
6.3 How to Use AtomPub Service and Category Documents;
6.4 How to Use AtomPub for Feed and Entry Resources;
6.5 How to Use Media Resources;
Chapter 7: Content Negotiation;
7.1 How to Indicate Client Preferences;
7.2 How to Implement Media Type Negotiation;
7.3 How to Implement Language Negotiation;
7.4 How to Implement Character Encoding Negotiation;
7.5 How to Support Compression;
7.6 When and How to Send the Vary Header;
7.7 How to Handle Negotiation Failures;
7.8 How to Use Agent-Driven Content Negotiation;
7.9 When to Support Server-Driven Negotiation;
Chapter 8: Queries;
8.1 How to Design URIs for Queries;
8.2 How to Design Query Responses;
8.3 How to Support Query Requests with Large Inputs;
8.4 How to Store Queries;
Chapter 9: Web Caching;
9.1 How to Set Expiration Caching Headers;
9.2 When to Set Expiration Caching Headers;
9.3 When and How to Use Expiration Headers in Clients;
9.4 How to Support Caching for Composite Resources;
9.5 How to Keep Caches Fresh and Warm;
Chapter 10: Conditional Requests;
10.1 How to Generate Last-Modified and ETag Headers;
10.2 How to Implement Conditional GET Requests in Servers;
10.3 How to Submit Conditional GET and HEAD Requests from Clients;
10.4 How to Implement Conditional PUT Requests in Servers;
10.5 How to Implement Conditional DELETE Requests in Servers;
10.6 How to Make Unconditional GET Requests from Clients;
10.7 How to Submit Conditional PUT and DELETE Requests from Clients;
10.8 How to Make POST Requests Conditional;
10.9 How to Generate One-Time URIs;
Chapter 11: Miscellaneous Writes;
11.1 How to Copy a Resource;
11.2 How to Merge Resources;
11.3 How to Move a Resource;
11.4 When to Use WebDAV Methods;
11.5 How to Support Operations Across Servers;
11.6 How to Take Snapshots of Resources;
11.7 How to Undo Resource Updates;
11.8 How to Refine Resources for Partial Updates;
11.9 How to Use the PATCH Method;
11.10 How to Process Similar Resources in Bulk;
11.11 How to Trigger Bulk Operations;
11.12 When to Tunnel Multiple Requests Using POST;
11.13 How to Support Batch Requests;
11.14 How to Support Transactions;
Chapter 12: Security;
12.1 How to Use Basic Authentication to Authenticate Clients;
12.2 How to Use Digest Authentication to Authenticate Clients;
12.3 How to Use Three-Legged OAuth;
12.4 How to Use Two-Legged OAuth;
12.5 How to Deal with Sensitive Information in URIs;
12.6 How to Maintain the Confidentiality and Integrity of Representations;
Chapter 13: Extensibility and Versioning;
13.1 How to Maintain URI Compatibility;
13.2 How to Maintain Compatibility of XML and JSON Representations;
13.3 How to Extend Atom;
13.4 How to Maintain Compatibility of Links;
13.5 How to Implement Clients to Support Extensibility;
13.6 When to Version;
13.7 How to Version RESTful Web Services;
Chapter 14: Enabling Discovery;
14.1 How to Document RESTful Web Services;
14.2 How to Use OPTIONS;
Additional Reading;
Books;
References;
Overview of REST;
Uniform Resource Identifiers;
Resources;
Representations;
Uniform Interface;
Hypermedia and Application State;
HTTP Methods;
OPTIONS;
GET;
HEAD;
POST;
PUT;
DELETE;
TRACE;
Atom Syndication Format;
Key Elements of Feeds and Entries;
Other Atom Elements to Consider;
Link Relation Registry;
alternate;
appendix;
bookmark;
chapter, section, subsection;
contents;
copyright;
current;
describedby;
edit;
edit-media;
enclosure;
first, last, next, next-archive, prev, previous, prev-archive, start;
glossary;
help;
index;
license;
payment;
related;
replies;
self;
service;
stylesheet;
up;
via;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Posted June 4, 2011

    Awesome primer on RESTful service design

    I have used REST for years, but never needed to build my own service implementing it until recently. This book helped a lot. A bit too newbie in some places, and the example depth is inconsistent, but an excellent book.

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)