Using Drupal's Content APIs to Build Real-Time Mobile Apps
Joseph Mosby
@josephmosby
Meetings Mean Business
Requirements
  • Content must be stored natively on the device
  • Content will be refreshed regularly
  • Content type data may change
  • Content must be updated in lockstep with website
Drupal's Content API Module!
(sponsored by the FCC and Seabourne)
The Content API Module
  • Publishes all Drupal content as a web API
  • Allows admins to customize what is returned via API calls
  • Allows searching by type, node ID, title, author, relationship, etc.
  • End users can add, remove and modify content in a familiar Drupal interface
MMB's Workflow
  1. When app is opened, query the API for all content
  2. Parse manifest XML and check if content is loaded on device already
  3. For new or updated content, load detail page XML and download data
  4. Store all data and render on device
  • Google's recommended XML parsing approach on Android took more than 10 seconds to parse
  • Google's recommended HTTP connection approach took 50 seconds to download data
  • Our "Programming Android" book had buggy code examples
  • Content API module only returns 10 records before pagination
Resources
Joseph Mosby
@josephmosby

/

#