Drupal 6 Web Services (book review)

Drupal 6 Web Services https://www.packtpub.com/drupal-web-services/book

Who it's for:

This book is ideal for someone who has used other platforms to integrate with web services and is now interested in Drupal, or someone who is roughly familiar with Drupal, and is interested in connecting it to web services.

My main thoughts:

A solid, well-constructed book that demonstrates many ways to integrate Drupal with web services, both as a consumer and a provider. I see this book as a once-through type of book, and less as one that I'll keep coming back to as a primary reference source.

This book is clear, thorough, not a lot of cruft, and still maintains a human, personal tone. Definitely the style I like. This book provides plenty of examples of using existing modules to plug in to existing web services, and is primarily a about how to fully leverage these modules. It is substantially lighter on writing custom code to integrate with new and yet to be born APIs. The modules that are demonstrated here are great to use as models, if wanting to write custom integrations.

Modules and services that are used:

  • Live FedEx shipping quotes for an ubercart order.
  • Connecting to Flickr
  • Getting data from Amazon
  • Video service integration (CDN2, Kaltura)
  • Anti-Spam modules
  • Twitter, LinkedIn, Facebook
  • OpenID & OAuth
  • Getting started with the Services module and XML-RPC

Other thoughts:

I definitely recommend reading the table of contents and skimming the book, then diving in to the portion that seems most interesting. Don't get bogged down in other sections.

Often, communicating with external applications require authentication or even an account. This book walks you through this important part of the process.

This book is geared around Drupal 6. All concepts can be applied in Drupal 7, but many of the specific modules used are not available for Drupal 7 yet.

While web services seem to be mostly about pushing or pulling data, reading this book will show that the possibilities are much richer, for example, chapter 12 on authentication.

Chapter by chapter thoughts:

Chapter 1

  • Good intro to what web services are, why you would want to use them, how Drupal can interact with them, including communication protocols for consuming, providing, and interacting with external applications.
  • Rich with examples as well as pointers to outside resources.

Chapter 2

  • Exploring communication with a web service.
  • Soapclient module.
    • a good debugging tool, because working with external services can be unpredictable.
  • Examining an existing module (uc_fedex) -- I like this approach, examining existing modules.

Chapter 3

  • Consuming: displaying photos from Flickr in many different ways on your drupal site.

Chapter 4

  • Consuming: Amazon.com
  • Looking up products. Views integration.
  • Connecting live to Amazon Store, using Amazon's shopping cart.

Chapter 5

  • Heavy Media discussion.
  • Upload video through Drupal via CDN2 and Kaltura, two different web services.
  • Couple of CCK field screenshots are wrong, such as showing CDN2 configuration in the Flickr Photoset section. oops!

Chapter 6

  • Services module
  • Writing a custom service, making Drupal the provider.
  • The only chapter heavy on coding.
  • Personally, I'm stickler for code formatting, especially on Drupal's standards for indenting. Although the code sample in this chapter is short, I had to reexamine it several times because of the indenting, to check if I was missing a bit of conditional logic. But the concepts and code functionality seem solid.

Chapter 7

  • Communication & Consuming: Antispam modules
  • Thorough examples, but starts to feel like sort of a tangent.

Chapter 8

  • Push content into Drupal from Google Docs
  • Sync content between two sites: the Deployment module (system)
    • Seemed brief, for what the Deployment module can do.

Chapter 9

  • Twitter
  • Auto-post tweets about new content.
  • Display a user's tweets in a block or on a page.
  • Tweet based on other conditions. (interesting possibilities)

Chapter 10

  • Showing LinkedIn profile info inside Drupal.
  • Publishing content from Drupal to LinkedIn
  • It is very unusual to suggest editing downloaded modules, but is suggested a lot on this linkedin module. This can be good for learning, but bad for long term maintainability.

Chapter 11

  • Facebook
  • Publishing from Drupal to a Canvas page

Chapter 12

  • Authentication
  • Open ID (e.g. Google) In Drupal core, use it to log in to your site.
  • OAuth (Twitter, LinkedIn) -- making your site behave like an application, reviewing the Twitter module


  • Handy list of modules to use or to pick apart and study.