The number of people who access the Web using mobile devices — such as smartphones and tablets — is growing rapidly every day, to the extent that it has even exceeded the number who surf the Web using traditional platforms, such as laptops and desktop computers. Consequently, the websites we design and build must be made compatible with these new platforms if we hope to serve the needs of most visitors. For Drupal developers, themers, and website administrators, the first question that may come to mind is: What resources are available for learning how to create mobile-ready websites, requiring the minimum time and complexity for us, while resulting in the maximum device compatibility and aesthetic success for our visitors?
Given the tremendous interest in Drupal mobile websites, one might imagine that there would already be several books published on the subject. But remarkably, as of this writing (May 2011), there is only one! In April 2011, Wrox published a book written by James Pearce: Professional Mobile Web Development with WordPress, Joomla! and Drupal (ISBN 978-0470889510). In this article, I examine the book from the perspective of a Drupal enthusiast. Because the book features two additional CMSs, one might assume that only a third of the book would be of interest to a Drupal programmer. But more than half the material is not specific to any CMS — and I found this CMS-neutral information to be of even greater value. Spanning 552 pages, the book's material is organized into five parts, of which the second and third are the most substantial in length and information.
The first five chapters — which form the first part of the book, "The World of the Mobile Web" — serve as an overview of the mobile Web itself, website development for mobile devices (as compared to the desktop), mobile technologies and networks, their technical limitations, recent developments in the mobile space, online information resources, and mobile browsers. The chapter that probably would be of most interest to Drupal developers is the fifth one, "The Mobile Toolbox", which covers various mobile development techniques, server-side technologies, and programming tools that are frequently chosen for building mobile-ready websites.
In the lengthiest part of the book, "Major CMS Platforms", the author shows how one could apply the aforesaid techniques to create mobile-ready websites based upon the three most popular CMSs (WordPress, Drupal, and Joomla). Developers who use Drupal exclusively will learn nothing of value from the first and third sections. The Drupal-specific chapters (13 and 14) first cover the basics, and then explore the two major relevant contrib modules: Mobile Plugin and Mobile Tools. The main blemish is that the author presents the Mobile Plugin module as a solution for both Drupal 6 and 7, but as of this writing there is no version of it for Drupal 7, and it is no longer being maintained. Readers could also become frustrated because the API calls in Chapter 14 do not work for Drupal 7 (released months before the book), although no mention is made that the code is intended only for Drupal 6.
As with any first edition of a technical work, this one has some flaws: Some of the example code could have been better crafted, e.g., using fieldsets for grouping input fields (instead of divs). Also, there are more than three dozen errata in just the first two thirds of the book. Fortunately, none of them obscure the intended meaning of the narrative, or the value of the example source code. Overall, James Pearce's book is a contribution that should be welcomed by all Drupal mobile programmers — and not just because it's the only one currently available!