RESTful PHP Web Services

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

RESTful PHP Web Services

Starting
Samisa Abeysinghe

Learn the basic architectural concepts and step through examples of consuming and creating RESTful web services in PHP
$14.40
$39.99
RRP $23.99
RRP $39.99
eBook
Print + eBook
$12.99 p/month

Want this title & more? Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.
+ Collection
Free sample

Book Details

ISBN 139781847195524
Paperback220 pages

About This Book

  • 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

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.

Table of Contents

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
Summary
Chapter 2: REST with PHP—A First Look
HTTP with PHP
Building the Request with XML Tools
Processing the Response
Consuming Flickr
Summary
Chapter 3: REST in the Real World
Types of Services Available
Consuming Real-World Services
Mashups
Summary
Chapter 4: Resource-Oriented Services
Designing Services
Simplified Library System
System Implementation
Summary
Chapter 5: Resource-Oriented Clients
Designing Clients
Resource Design
System Implementation
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
Summary
Chapter 7: Debugging REST Web Services
Message Tracing
Errors in Building XML
Errors in Parsing XML
Best Practices
Summary

What You Will Learn

  • 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

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.

Authors

Table of Contents

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
Summary
Chapter 2: REST with PHP—A First Look
HTTP with PHP
Building the Request with XML Tools
Processing the Response
Consuming Flickr
Summary
Chapter 3: REST in the Real World
Types of Services Available
Consuming Real-World Services
Mashups
Summary
Chapter 4: Resource-Oriented Services
Designing Services
Simplified Library System
System Implementation
Summary
Chapter 5: Resource-Oriented Clients
Designing Clients
Resource Design
System Implementation
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
Summary
Chapter 7: Debugging REST Web Services
Message Tracing
Errors in Building XML
Errors in Parsing XML
Best Practices
Summary

Book Details

ISBN 139781847195524
Paperback220 pages
Read More