Chapter 13. Mashups with public web services

 

This chapter covers

  • Integrating Zend_Service_Amazon into a Zend Framework application
  • Displaying images from Flickr
  • Presenting YouTube videos on your own website

In the previous chapter, we looked at some of the more general web service components of Zend Framework and explored both client and server roles. In this chapter, we’re going to take on the client role and use some of the publicly available web services to make significant additions to our Places site. It would also be fair to say that this chapter should be easier and, if it’s possible, even a bit more exciting than the last. Chapter 12 demonstrated the use of one such public web service, the Akismet spam-filtering service, using the more general components Zend_Http_Client and Zend_Rest. While doing so, we also mentioned that Zend Framework has a prebuilt component for doing this: Zend_Service_Akismet. Of course, this chapter wouldn’t exist if there weren’t more of these components, and we’ll start off with an overview of many of the currently available web service components.

We’ll then demonstrate some of those components. Our aim in doing so is not only to show how they can be used but also how they can be integrated into a Zend Framework-based application. In the process, we’ll also give you an early introduction to the use of Zend_Cache to cache the results and avoid the inevitable slowness of including content from remote web services.

13.1. Accessing Public Web Services

13.2. Displaying ads with Amazon Web Services

13.3. Displaying Pictures from Flickr

13.4. Using Zend_Gdata for Google Access

13.5. Summary