Presentation given at Drupal Camp Dallas - July 9, 2011 on developing smartphone apps with Drupal 7 using the Services Module, jQuery Mobile, PhoneGap, and Drupal iOS SDK
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Building Mobile Applications with Drupal
1. Building Mobile
Applications with Drupal
Jeff Linwood
Drupal Camp Dallas July 9, 2011
http://www.jefflinwood.com/
@jefflinwood
Saturday, July 9, 2011
2. Building Mobile Apps
with Drupal
+ =
• Drupal + Mobile Architecture
• jQuery Mobile + PhoneGap Demo
• Configuring Drupal 7 Services + REST
Saturday, July 9, 2011
3. Native HTML5 Hybrid
Android Mobile PhoneGap
iPhone, iPad Framework Titanium
Saturday, July 9, 2011
4. Drupal plays well with others
• Services module
• REST
• JSON
Saturday, July 9, 2011
6. Architecture
Android iPhone Mobile Framework
JSON Plist XML AJAX/JSON
REST Endpoint
Services Module
Drupal 7
Saturday, July 9, 2011
7. Caching and Offline Access
• Driven by requirements
• Cache data in SQLite
• Cache JSON on the file system
• Only online access for some
functionality
Saturday, July 9, 2011
9. Code Walkthrough
• Review Project in XCode 4
Saturday, July 9, 2011
10. Configuring Services 3
with D7
Install and enable modules:
• Services (Services + REST Server)
• rest_server_plist
• Services_views
• ctools
Saturday, July 9, 2011
11. Add Endpoint
• Name
• Path (no slashes)
Saturday, July 9, 2011
12. Edit Resources
• Need to determine what you want to serve
through the endpoint
• What actions are allowed?
• Drupal permissions
Saturday, July 9, 2011
13. Mobile Dev Resources
• Drupal iOS SDK - https://github.com/
workhabitinc/drupal-ios-sdk
• DrupalCloud - https://github.com/skyred/
DrupalCloud
• PhoneGap - http://www.phonegap.com/
• jQuery Mobile - http://jquerymobile.com/
Saturday, July 9, 2011
14. Drupal+Mobile Recipes
• Showing Nodes on a Map
• Drupal 7 - GMap + Location
• iPhone - MKMapKit
• Android - MapView
Saturday, July 9, 2011
15. Mobile Recipe - Views
• Drupal can do all the heavy lifting with the
views
• May not need complex data handling code
on each client
• iOS - Drupal iOS SDK, UITableView
• Android - ListActivity, ArrayAdapter
Saturday, July 9, 2011
18. To follow my app
adventures
• http://www.jefflinwood.com/
• github:jefflinwood
• twitter: @jefflinwood
• Always interested in new apps and projects
Saturday, July 9, 2011