Book Image

RESTful PHP Web Services

By : Samisa Abeysinghe
Book Image

RESTful PHP Web Services

By: Samisa Abeysinghe

Overview of this book

<p>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.<br /><br />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.<br /><br />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.<br /><br />This book is about implementing RESTful web services in PHP, and so the book is packed with example code and careful explanations.</p>
Table of Contents (15 chapters)
RESTful PHP Web Services
Credits
About the Author
About the Reviewers
Preface
Index

Summary


In this chapter, we used the REST classes provided with the Zend Framework to implement the sample library system. The design of the service and client was covered along with the MVC concepts supported by the Zend Framework.

We discussed how resources map to the Model in MVC. Then we also discussed how HTTP verbs, when combined with resource URIs, map to the Controller in MVC.

We discussed how to combine Zend_Rest_Server with Zend_Controller to implement the business operations of the service.

We also explored how to use Zend_Rest_Client class to consume the services. And we implemented a sample web-based application using REST client to consume the REST service.

In the next chapter, we will discuss how to debug and troubleshoot REST services and clients.