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
This is the first book that applies the REST design philosophy to real web services. It sets down the best practices you need to make your design a success, and the techniques you need to turn your design into working code. You can harness the power of the Web for programmable applications: you just have to work with the Web instead of against it. This book shows you how.
This open book is licensed under a Creative Commons License (CC BY). You can download RESTful Web Services ebook for free in PDF format (6.2 MB).
Table of Contents
The Programmable Web and Its Inhabitants
Writing Web Service Clients
What Makes RESTful Services Different?
The Resource-Oriented Architecture
Designing Read-Only Resource-Oriented Services
Designing Read/Write Resource-Oriented Services
A Service Implementation
REST and ROA Best Practices
The Building Blocks of Services
The Resource-Oriented Architecture Versus Big Web Services
Ajax Applications as REST Clients
Frameworks for RESTful Services
Some Resources for REST and Some RESTful Resources
The HTTP Response Code Top 42
The HTTP Header Top Infinity