RESTful PHP Web Services

Samisa Abeysinghe

eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$14.39 save 40%!
Print book: $39.99
$35.99 save 10%!
Print + eBook bundle: $63.98
Includes free access to the book on PacktLib
$39.59 save 38%!
Free Shipping! UK, US, Europe and selected countries in Asia.
This book can also be purchased from:
Overview
Table of Contents
The Author
Reviews
Downloads
  • Get familiar with REST principles
  • Learn how to design and implement PHP web services with REST
  • Real-world examples, with services and client PHP code snippets
  • Introduces tools and frameworks that can be used when developing RESTful PHP applications

Book Details

Language : English
Paperback : 220 pages [ 235mm x 191mm ]
Release Date : October 2008
ISBN : 1847195520
ISBN 13 : 978-1-847195-52-4
Author(s) : Samisa Abeysinghe
Topics and Technologies : All Books, Architecture & Analysis, Open Source, PHP, Web Development


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
    • Building the Request with XML Tools
      • SimpleXML
      • DOM
    • Processing the Response
      • SimpleXML
      • DOM
    • Consuming Flickr
      • Photo Search
      • Photo Search with Information
    • Summary
  • 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
    • 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
    • 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

Samisa Abeysinghe

Samisa Abeysinghe is Director, Engineering at WSO2. Samisa pioneered the Apache Axis2/C effort and architected the core of the Apache Axis2/C Web services engine. He continues to be an active contributor in the Apache Axis2/C project. His involvement in open-source projects began in 2004 when he started working with the Apache Axis C/C++ project.

Prior to his current role, Samisa played the project lead role for the WSO2 Web services Framework for PHP project, which provides comprehensive support for building both SOAP and REST services and clients.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Find your book in our support section to find errata and to download code samples.

What you will learn from this book

  • Basic concepts of REST architecture
  • Consuming public REST-style services from your PHP applications
  • Consuming RESTful web services, such as those from leading APIs such as Flickr, and Yahoo Web Search
  • Making your own PHP applications accessible to other applications through a RESTful API
  • REST support in the popular Zend framework
  • Debugging RESTful services and clients
  • A case study of designing a RESTful PHP service from the ground up, and designing clients to consume the service

Special Offers

PacktLib gives you access to this and 600+ other titles with an annual or monthly subscription.

Annual subscription:

$220.00 per annum

Monthly subscription:

$21.99 per month

Buy 2 eBooks and Get 50% Off +
Buy RESTful PHP Web Services with Expert PHP 5 Tools and get 50% off both the eBooks.
 
Just add both the eBooks to your shopping cart and enter rtwept in the 'Enter Promotion Code' field. Click 'Add Promotion Code' and the discount will be applied.
View Best Selling eBook offers

In Detail

Representational State Transfer (REST) is a form of software architecture; systems that follow it are often called RESTful. It is the architectural style that drives the World Wide Web (the motivation for REST was to capture elements that made the Web successful), and RESTful web services use simple protocols already familiar to web developers. RESTful web services are found in lots of places with big name Web APIs such as Flickr, and Yahoo search following a REST-based approach.

With any architectural style or approach, struggling with its basic concepts is just one problem – implementation in your favorite language is another, and that's where this book comes in. If you're a PHP developer, this book will show you how to create and consume RESTful web services in PHP, and make your services work well in the context of the Web.

You will learn about the basic concepts of REST, and then look at PHP tools, libraries and techniques for working with RESTful web services. You will see how to use other RESTful services from your PHP applications, and also how to engineer your PHP applications to make them RESTful.

This book is about implementing RESTful web services in PHP, and so the book is packed with example code and careful explanations.

Learn the basic architectural concepts and step through examples of consuming and creating RESTful web services in PHP.

Approach

The book explains the basic concepts associated with the REST architectural style, but the emphasis is on creating PHP code for consuming and creating RESTful services in PHP. There is plenty of example PHP code to illustrate the concepts, with careful explanations of how the code works.

Who this book is for

This book targets PHP developers who want to build or make use of RESTful web services, or explore the options available to them in PHP. You will need to know the basics of PHP development, but no knowledge of REST is assumed, nor any knowledge of creating web services generally.

Are there no books available that are right for you at the moment? How about signing up to our newsletter to keep up to date?
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Sort A-Z