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 mobile Drupal 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: (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 Chapters 8 through 10, the author presents several user interface patterns utilized by the three featured CMSs (forms, content lists, image galleries, and comments), and explains how they could be applied to mobile websites. He also covers some critical design considerations—such as CSS media queries—and several HTML/CSS templates and libraries that could be valuable as starting points if one opted to not use a CMS plug-in. Sadly, there do not appear to be any Drupal contrib modules to control CSS media queries, possibly because it would require modifying html.tpl.php, and such settings would likely conflict with the themer's choices in the theme's .info file.
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!
Drupal Mobile Web Development Beginner's Guide published in 2012 by Packt Publishing is also available. I found it very useful as a beginner to mobile (rather than to Drupal). It covers setting up a local development environment in Mac and Windows, using Domain Access, Context, Display, and Views to set up a mobile theme, media, geo, services, and more.
If we're going to post year-old articles fresh on the Drupal Planet, maybe some editing or a quick fact-check would be beneficial. There are several books out now on Drupal and mobile development, one even specific to Drupal 7. While I appreciate the fact that Drupal Watchdog is making these articles available online, it would be great for everyone reading these as new if they gave the authors a chance to make corrections or updates before publishing year-old articles.