You are previewing Drupal 7 Mobile Web Development.
O'Reilly logo
Drupal 7 Mobile Web Development

Book Description

Transform your existing Drupal site into one that is completely compatible with mobile and tablet devices.

  • Follow the example of a ‘Mom & Pop’ restaurant site to make the transition to a mobile site easier

  • Prototype a distributed team workflow with GIT version control

  • Implement audio, video, charting and mapping solutions that work on Mobile, Tablet, and Desktop browsers

In Detail

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.

The Drupal Mobile Web Development Beginner’s Guide follows a humble ‘Mom & 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.

Restaurant websites are notoriously horrible to navigate and our Mom & 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.

Table of Contents

  1. Drupal 7 Mobile Web Development
  2. Credits
  3. About the Author
  4. About the Reviewers
  5. www.PacktPub.com
    1. Support files, eBooks, discount offers, and more
      1. Why Subscribe?
      2. Free Access for Packt account holders
  6. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Time for action — heading
      1. What just happened?
      2. Pop quiz — heading
      3. Have a go hero — heading
    6. Reader feedback
    7. Customer support
      1. Downloading the example code
      2. Errata
      3. Piracy
      4. Questions
  7. 1. When is a Phone Not a Phone?
    1. "Dumb" phones
    2. "Smart-er" phones
    3. Smart phones
    4. Tablets
    5. WebKit
    6. Mobile-ize me!
    7. What is mobile?
    8. The "One Design" myth
    9. Mobile simulators
    10. Time for action — installing an Android development package
      1. What just happened?
    11. iOS
    12. Time for action — installing the Mac OS developer's package
      1. What just happened?
    13. Summary
  8. 2. Setting up a Local Development Environment
    1. Drupallo's Pizza Kitchen
    2. Averting disaster
    3. A word about platforms
    4. Time for action — downloading the SCM client for Mac
      1. What just happened?
    5. Cygwin and GIT for Microsoft Windows
    6. Time for action — installing a development environment using Windows and Cygwin
      1. What just happened?
    7. Text editors for Mac OS X and Microsoft Windows
    8. Serving web pages on your computer
    9. MAMP
    10. Time for action — configuring our first virtual host
      1. What just happened?
    11. Time for action — changing the default configuration for MAMP
      1. What just happened?
    12. WAMP (Windows, Apache, MySQL, and PHP)
    13. Time for action — installing WAMP
      1. What just happened?
    14. Drush and Drush Make
    15. Time for action — installing Drush and Drush Make for Mac OS X
      1. What just happened?
    16. Time for action — installing Drush for Windows
      1. What just happened?
    17. Building a Drupal website with Drush Make
    18. Time for action — building a Drupal install from a make file
      1. What just happened?
    19. The local database
    20. Time for action — creating a database
      1. What just happened?
      2. Pop quiz
    21. Summary
  9. 3. Selecting the Right Domain for your Mobile Site
    1. Once upon a website...
    2. One ring to rule them all
      1. Domain Access versus Multisite
    3. Time for action — installing Domain Access module
      1. What just happened?
      2. Domain management
    4. Time for action — configuring Apache
      1. What just happened?
    5. Bootstrapping the domain
    6. Time for action — bootstrapping the Domain Access module
      1. What just happened?
    7. Introduction to the Features module
    8. Time for action — installing and creating your first feature
      1. What just happened?
    9. Time for action — updating the feature with new settings
      1. What just happened?
      2. Have a go hero — adding hooks to the feature
    10. Deployment—best practices
    11. Time for action — code check-in and deployment
      1. What just happened?
      2. Pushing out features
    12. Time for action — check in your features module
      1. What just happened?
      2. Pop quiz
    13. Summary
  10. 4. Introduction to a Theme
    1. Progressive Enhancement
      1. HTML5 and the simplified DOCTYPE
      2. New HTML5 semantic elements
    2. Drupal 6 versus Drupal 7 theming
    3. Time for action — installing the default mobile theme
      1. What just happened?
    4. The simple life
    5. Media queries
    6. Time for action — personalizing the mobile theme
      1. What just happened?
    7. Redirecting mobile clients
    8. Time for action — writing JavaScript redirection for our theme
      1. What just happened?
    9. Give them what you think they need until they tell you what they want
    10. Behave yourself
      1. Drupal behaviors
    11. Time for action — redirection with a cookie to remember state
      1. What just happened?
      2. Pop quiz
    12. Summary
  11. 5. A Home with a View
    1. The Context and Display suite modules
    2. Time for action — creating a mobile-friendly home page
      1. What just happened?
    3. Pushing changes from one environment to another
    4. Time for action — updating the Home Page feature
      1. What just happened?
    5. The menu
    6. Time for action — creating the menu content types
      1. What just happened?
    7. Bundling up the changes
    8. Time for action — bundling the changes into a package
      1. What just happened?
      2. Have a go hero — adding the Print CSS file
      3. Pop quiz
    9. Summary
  12. 6. The Elephant in the Room: Audio, Video, and Flash Media
    1. Flash and iOS
    2. Incorporating video into your web content
    3. Time for action — embedding media files
      1. What just happened?
    4. Time for action — adding content
      1. What just happened?
      2. A word about encoding
      3. "I did it my way"
    5. Charting and graphs
    6. Time for action — graphing a view
      1. Pop quiz
    7. Summary
  13. 7. Location, Location, Location
    1. Geolocation
    2. The navigator.geolocation object
    3. Time for action — adding location data to nodes
      1. What just happened?
    4. From address to longitude and latitude
    5. Time for action — geocoding a node's location data
      1. What just happened?
    6. The close2u module
    7. Time for action — downloding and enabling the close2u module
      1. What just happened?
    8. Finishing the page
    9. Time for action — finding the closest franchise the hard way
      1. What just happened?
      2. Pop quiz
    10. Summary
  14. 8. Services with a Smile
    1. Using Drupal to power your native application
    2. Time for action — creating a REST service
      1. What just happened?
    3. Time for action — testing your new REST service
      1. What just happened?
    4. APIs: The future of the interactive web
    5. Customized services
    6. Time for action — custom REST service formatter
      1. What just happened?
      2. Have a go hero — creating REST service formatter
    7. jQuery Mobile
    8. Time for action — using jQM as our base theme
      1. What just happened?
      2. Have a go hero
    9. jQuery Mobile JavaScript Events
    10. Time for action — the AJAX login form
      1. What just happened?
      2. Pop quiz
    11. Summary
  15. 9. Putting it Together
    1. Display Suite
    2. Hooks, styles, and build modes
    3. Time for action — retheming nodes for our jQuery mobile theme
      1. What just happened?
      2. Have a go hero — adding a CSS3-based page transactions
    4. Time for action — adding theming to the rendered node
      1. What just happened?
      2. Have a go hero — adding an API hook
    5. Beyond core menu items
    6. Time for action — customized menu attributes
      1. What just happened?
    7. Fonts
    8. Time for action — adding fonts
      1. What just happened?
      2. Pop quiz
    9. Summary
  16. 10. Tabula Rasa: Nurturing your Site for Tablets
    1. The human touch
    2. The event-driven model
    3. Touch and go
    4. The main event
    5. Time for action — adding a swipe advance to the home page
      1. What just happened?
      2. Have a go hero — adding a swipe gesture
    6. The changing landscape (or portrait)
    7. "Starting over" or "Everything you know about designing websites is wrong"
    8. Wire framing made easy
    9. Drupal 7 Commerce module
    10. Time for action — the one true theme
      1. What just happened?
    11. Time for action — creating a product
      1. What just happened?
      2. Have a go hero — adding a PayPal payment option
    12. A room with a viewport
    13. Time for action — setting the viewport with JavaScript
      1. What just happened?
    14. Time for action — advanced media queries for tablets
      1. What just happened?
      2. Pop quiz
    15. Summary
  17. 11. A Home in the Clouds
    1. Problems introduced by modern websites
    2. Amazon Web Services (AWS)
    3. Time for action — setting up AWS and RightScale
      1. What just happened?
    4. Time for action — using an AMI to create a server
      1. What just happened?
    5. Time for action — Jenkins builds our site
      1. What just happened?
      2. Pop quiz
    6. Summary
  18. A. Pop quiz Answers