Table of Contents
Preface
Chapter 1: Introduction to REST
Chapter 2: REST with PHP—A First Look
Chapter 3: REST in the Real World
Chapter 4: Resource-Oriented Services
Chapter 5: Resource-Oriented Clients
Chapter 6: Resource-Oriented Clients and Services with Zend Framework
Chapter 7: Debugging REST Web Services
Appendix A: WSO2 Web Services Framework for PHP
Appendix B: RESTClient class
Index
- Chapter 1: Introduction to REST
- Programmable Web
- HTTP and Web Services
- What is REST?
- HTTP Methods
- The Need for RESTful Web Services
- REST Tools and Frameworks in PHP
- XML Parsers
- Tools for Accessing Services
- Providing Services
- PHP REST Frameworks
- Tonic
- Konstrukt
- Zend Framework
- WSO2 WSF/PHP
- Madeam
- dbscript
- What Framework to Use
- Summary
- Chapter 2: REST with PHP—A First Look
- HTTP with PHP
- CURL
- HTTP GET
- HTTP POST
- HTTP PUT
- HTTP DELETE
- CURL
- Building the Request with XML Tools
- SimpleXML
- DOM
- Processing the Response
- SimpleXML
- DOM
- Consuming Flickr
- Photo Search
- Photo Search with Information
- Summary
- HTTP with PHP
- Chapter 3: REST in the Real World
- Types of Services Available
- Consuming Real-World Services
- Cresting our Utility Code—RESTUtil.php
- Consuming an RSS Feed—BBC News Feed
- BBC News Feed with Yahoo News Search
- Yahoo Maps and Local Search
- Earthquakes and Yahoo Maps
- Mashups
- Summary
- Chapter 4: Resource-Oriented Services
- Designing Services
- Simplified Library System
- Resource Design
- PUT vs POST
- URI Design
- URI and HTTP Verb Mapping
- Resource Design
- System Implementation
- Library Database
- Web Page from Data
- Retrieve Operation
- Create Operation
- Handling Multiple Path Parameters
- Summary
- Chapter 5: Resource-Oriented Clients
- Designing Clients
- Resource Design
- System Implementation
- Retrieving Resource Information
- Creating Resources
- Deleting Resources
- Putting it All Together
- Implementing a Form-based Application
- Summary
- Chapter 6: Resource-Oriented Clients and Services with Zend Framework
- Installing Zend Framework
- Services with Zend_Rest_Server
- Clients with Zend_Rest_Client
- Library System with Zend REST classes
- Library Service
- Controllers for Book and Member Resources
- Models for Book and Member Resources
- Application Configuration and Initialization
- Book Controller
- Member Controller
- Library Clients
- List Books with GET
- Add a Book with POST
- List Members with GET
- Add a Member with POST
- Complete Client Application Controller
- Library Service
- Summary
- Chapter 7: Debugging REST Web Services
- Message Tracing
- Errors in Building XML
- Errors in Parsing XML
- Best Practices
- Summary
- Appendix A: WSO2 Web Services Framework for PHP
- Installing WSF/PHP
- Implementing Services
- Implementing Clients
- SOAP Service and Client
- Summary
- Appendix B: RESTClient class
- get Method
- post Method
- put Method
- delete Method
- Complete RESTClient Class
- get Example
- post Example
- Yahoo Search Client Example
- Summary