A Two Way Street: Connecting Drupal and A Flexible Mobile Content Creation App
This talk will focus on our strategy, process, and results while building a Drupal 7 API based on Services module and a native iOS app that takes advantage of it to effectively provide a UI for mobile content creation even for complicated content types.
One of Drupal's greatest strengths is the flexibility it provides site administrators when it comes to structuring the various content types they have on their sites: right from the UI they can create new content types and add all kinds of fields to them. However, this flexibility has always posed a problem for any remote application wishing to interact with a Drupal site via web services: if we want to post an article from an app or a remote Drupal site to site X, how can we know what structure the article needs to have? We can certainly assume it has a title and a body, and most likely an image field (like the 'article' content type that comes with the standard profile in Drupal 7). Is that image field required? Are there other required fields?
This was the biggest problem we were faced with when designing an iPhone app for drupalgardens.com. We wanted Drupal Gardens site owners to be able to publish content to their sites from their iPhones, but we could not make any assumptions about the content types they had or the structures of those content types. We realized that the wonderful flexibility of the Drupal CMS had to be incorporated into the design of the app itself.
In this talk we'll explain how we built the Drupal Gardens iPhone app and an API for it to talk to, in the form of the MASt module, keeping these concerns about flexibility in mind. The app works with any Drupal 7 site that has the MASt module installed and can be used to create content of any type, as long all required field types of the content type are supported either by MASt itself or by some other module implementing the necessary interfaces. We'll talk about some of the technical challenges we faced, including oAuth authentication, dynamically building content creation forms in the app, testing our API, dealing with image uploads, etc. We'll also discuss some future plans for the app, as well as some alternative uses for the MASt module independent of the particular app we built to talk to it.