Book Image

Drupal 7 Mobile Web Development Beginner's Guide

By : Tom Stovall
Book Image

Drupal 7 Mobile Web Development Beginner's Guide

By: Tom Stovall

Overview of this book

<p>How disappointing is it to log on to a website for a product or business you love only to discover the feature you were drawn to doesn’t work on your mobile or tablet? Drupal has brand new features to adapt your existing site into a mobile site that will keep your customers coming back.</p> <p>The Drupal Mobile Web Development Beginner's Guide follows a humble 'Mom &amp; Pop' restaurant website which gets a makeover complete with cutting edge features that play to mobile, tablet and desktop audiences. By following the fun example, you will finish the book having effortlessly adapted your website so that it is accessible and, more importantly, looks good and functions well, on any mobile device.</p> <p>Restaurant websites are notoriously horrible to navigate and our Mom &amp; Pop example is wellintentioned but no exception to this rule. We bring this site out of the early 1990's with cutting edge development practices and a team development workflow. This pizza chain goes mobile with location services, audio, video, charting and mapping worthy of any multi-million dollar site. Each chapter examines the way the site works and shows you how to move the existing content and functionality into reusable features.</p>
Table of Contents (18 chapters)
Drupal 7 Mobile Web Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Pop quiz Answers

Chapter 1. When is a Phone Not a Phone?

On January 9, 2007, Steve Jobs addressed a group of adoring Mac heads at the annual MacWorld conference. He talked about how Nokia had pioneered the mobile phone industry and created some of the best mobile phones in the market. He talked about how Blackberry had changed the world by creating devices that excelled at getting e-mails anywhere in the world securely and quickly, allowing you to respond to them instantly. He talked about how desktop computers were fantastic for browsing the Web, but no one had quite captured that desktop browsing experience in a handheld. Steve then showed the world the first iPhone—the world's first phone, e-mail, and mobile Internet device. The moment I saw it, I knew I had to have one.

I am, and have been an unabashed Apple fan. Both my parents were teachers and were able to check out Apple computers from the school library during the summer. This meant that I spent almost every summer of grade school in front of a monitor with the Apple logo on it. The iPhone was the culmination of all of those summers' enthusiasm times one thousand.

I went to the Tampa Apple Store after work on the day of the launch and I was the first one on my block to have a new iPhone. The data speed was excruciatingly slow and the phone dropped calls more than a freshman football player drops passes, but the device revolutionized what we thought a handheld could be. And with each release, the iPhone continued to get better. As it had done three decades earlier with the personal computer industry and two decades earlier with the GUI, Apple had ignited innovation in the handheld space that the world would never be the same.

Some five years later, it's impossible to imagine a Friday night without texting your friends and getting information on which restaurant in the area serves the best Persian Kebob, and then sharing the location with them all, so they meet you there without a single phone call exchanged between you. We live in a handheld world and many a pundit has stated, "If you don't have a mobile strategy, you don't have a strategy".

So, what is your mobile strategy? Whether you sell cupcakes on Main Street to 12-years-old girls, or servers to wall street traders, Drupal gives you a framework to create a first-class mobile website.

Drupal is an open source piece of software installed on servers that allows you to manage content for a website through a web-based interface. You can pair your content with one or more themes, which will wrap the content in the HTML design of your choice.

There are tons of better CMSs out there, both paid and open source. What makes Drupal what it is today are two basic things—one is the hundreds of thousands of developers contributing modules to the Drupal framework. Second is Drupal's approach. Drupal approaches web development as a series of Lego™ blocks, each one building on the other until the entity becomes greater than the sum of the parts. This book will attempt to demystify the process.

So what is it that you hope to accomplish with your mobile site? The chances are that it's one of the following three general goals:

  • Broadcast message: Includes either news or information. Allows you to share information about your business or non-profit with current or future customers.

  • Interaction: Allows your customers to find you, contact you, or in other ways, interact with you.

  • Location portal: For example, find the best Kebob in Arlington, Virginia.

What you hope to accomplish will give you a better idea of who your audience is and what type of hardware they might have.

"Dumb" phones

In the beginning mobile telephones were large bricks that needed constant charging and had a very limited range. By the year 2000, Nokia and Motorola had most of the US Phone market selling what we now call "dumb" phones. Dumb phones were dubbed, thus, as a reaction to newer "smart" phones. They usually have a single color screen and a 12-key standard phone keypad with a power on and off button and maybe one or two other function keys. You can accomplish text input with a combination of presses on the keypad. The phone's secondary features such as storing phone numbers and texting are usually accomplished through a series of menus. The browsers on these phones use a protocol called Wireless Application Protocol (WAP) . WAP was evolved by necessity on these "dumb" phones in the early 2000s. WAP breaks up the content into a series of menus and text cards, and you can use the menus to navigate through the text cards to achieve something approaching a wireless Internet experience. Unless you know for sure that your audience is using WAP-only phones, you can probably choose to disregard it and author your site in HTML only. This book will only touch briefly on the WAP protocol and will turn most of its attention to full HTML sites, as the vast majority of mobile web traffic in the US and Europe are smartphones using WebKit-based full-HTML browsers.

In the beginning mobile telephones were large bricks that needed constant charging and had a very limited range. By the year 2000, Nokia and Motorola had most of the US Phone market selling what we now call "dumb" phones. Dumb phones were dubbed, thus, as a reaction to newer "smart" phones. They usually have a single color screen and a 12-key standard phone keypad with a power on and off button and maybe one or two other function keys. You can accomplish text input with a combination of presses on the keypad. The phone's secondary features such as storing phone numbers and texting are usually accomplished through a series of menus. The browsers on these phones use a protocol called Wireless Application Protocol (WAP). WAP was evolved by necessity on these "dumb" phones in the early 2000s. WAP breaks up the content into a series of menus and text cards, and you can use the menus to navigate through the text cards to achieve something approaching a wireless Internet experience. Unless you know for sure that your audience is using WAP-only phones, you can probably choose to disregard it and author your site in HTML only. This book will only touch briefly on the WAP protocol and will turn most of its attention to full HTML sites, as the vast majority of mobile web traffic in the US and Europe are smartphones using WebKit-based full-HTML browsers.

However, there are some places where "dumb" phones in the US excel and are readily accepted. These include the following:

  • Government jobs that require that your cell phone does not have a camera

  • Many Health and Human Services buildings that deal with minors and much of the court system has security in place that doesn't allow cameras in the building

If you have a cell phone with a camera, it's confiscated by the security guards and given back to you when you exit. After having my cell phone confiscated at the door on a trip to traffic court recently, I noticed many of the lawyers in the building were carrying phones that look like they were from another era. As long as security measures such as these are in effect, there will always be a market for the circa 2001-era "dumb" phone with a T9 keyboard and a WAP web browser.