PapayaSoft - Phuket web development

Review - 'Twilio Cookbook' by Roger Stringer From Packt

| Comments

Twilio Cookbook is a useful introduction, accessible to PHP developers at all levels, to developing apps using Twilio’s telephony platform. I had no experience with Twilio before reading this book and I now feel confident that I could easily incorporate Twilio functionality into my own applications.

The book is part of Packt’s “Cookbook” series, so it contains a fairly structured format for each application/recipe. The format can be roughly summarized in three steps:

  • What we are going to do: a brief overview of the app/goal
  • How to do it: the code, the recipe itself
  • How it works: a more detailed explanation of what the code achieves

The book clearly demonstrates how Twilio can be used to implement a wide variety of web-controlled telephony services, including SMS-based or Voice-based two-factor authentication, SMS-based surveys, conference calling, voice-mail with notifications, and others.

In general, the recipes often boil down to:

  1. put a script (or collection of scripts) on your publicly accessible web-server, and
  2. point your Twilio phone number to that script.

Like other reviewers, I would have liked to see more conceptual overview of Twilio’s services. But the Cookbook format is geared towards diving right in to code and building bare-bones functional prototypes. You won’t find a lot of advanced web best-practices here – there is no MVC or separation of concerns; there is very little error-checking or escaping of user input; the HTML is unstyled, bare-bones links and forms; there are variables in global scope; etc. As such, the recipes are not really suitable for production use.

But for the purposes of the book – demonstrating the core functionality of the Twilio system – stripping out all those considerations is actually beneficial, resulting in a clear exposition without any of those potentially distracting (though definitely necessary) aspects of general app-development.

In summary, Twilio Cookbook successfully does what it sets out to do. It demonstrates how to implement a wide range of telephony functionality using PHP and Twilio.

The book is available on both Amazon and on Packt.