app-ify drupal

24
App-ify Drupal Using Titanium and Services to put your web site in the App Store Joshua Schroeder Drupal Camp Alberta 2010 September 12, 2010

Upload: joshua-schroeder

Post on 04-Dec-2014

6.876 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: App-ify drupal

App-ify DrupalUsing Titanium and Servicesto put your web site in theApp StoreJoshua SchroederDrupal Camp Alberta 2010September 12, 2010

Page 2: App-ify drupal

Session Resources

๏ Presentation slides(http://slideshare.net/jdschroeder and http://jdschroeder.ca)

๏ Drupal site(http://github.com/jdschroeder/appify-drupal)

๏ Titanium project(http://github.com/jdschroeder/titanium-drupal)

2

Page 3: App-ify drupal

Hello, my name is Josh

and I like iPhones

3

Page 4: App-ify drupal

I also like Drupal4

Page 5: App-ify drupal

Obviously

5

this means I should put Drupal on my iPhone

Page 7: App-ify drupal

The easy wayLet someone else write

Objective-C for us.

7

Page 8: App-ify drupal

Appcelerator Titanium

๏ http://appcelerator.com

๏ Open source

๏ Write your apps using Javascript

๏ Compile to native iOS and Android apps

๏ vs. Phone Gap’s end-to-end web apps

๏ Limited to Titanium API

8

Page 9: App-ify drupal

Even the kitchen sink

Learn by example with the Kitchen Sink app

(http://github.com/appcelerator/KitchenSink)

9

Page 10: App-ify drupal

What about 3.3.1?

“Titanium produces a valid XCode project at application creation, generates Objective-C (and sometimes C/C++) and executes the xcodebuild to compile your XCode project into a native application using Apple’s published APIs.”(http://developer.appcelerator.com/blog/2010/04/update-on-apple-sdk-4-0-and-tos.html)

10

Page 11: App-ify drupal

What about it?

“In particular, we are relaxing all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code. This should give developers the flexibility they want, while preserving the security we need.”(http://www.apple.com/pr/library/2010/09/09statement.html)

11

Page 12: App-ify drupal

Web apps vs. Native

๏ Benefits of a native app(http://alistapart.com/articles/apps-vs-the-web)

๏ Speed, data management, animation, resources, usability, productivity, integration

๏ Your Drupal nodes are already on the web(http://drupal.org/project/iwebkit)

12

Page 13: App-ify drupal

Have your cake...

with the Services module(http://drupal.org/project/services)

13

nodes users system views

services(XML-RPC, JSON, REST, SOAP, etc.)

nod

e.vi

ew, u

ser.g

et,

syst

em.c

onne

ct

node.save, user.save,

system.w

atchdog

Page 14: App-ify drupal

In our tool belt

๏ Xcode/iPhone SDK(http://developer.apple.com/iphone)

๏ Appcelerator Titanium(http://developer.appcelerator.com)

๏ Drupal Services Module(http://drupal.org/project/services)

๏ JSON Server(http://drupal.org/project/json_server)

14

Page 15: App-ify drupal

Set-up your Drupal site๏ For this demo I’ve enabled these modules:

๏ admin_menu

๏ content, text

๏ imagecache

๏ views, views_ui

๏ services, node_service, views_service

๏ json_server

15

Page 17: App-ify drupal

What data to share?

๏ Let’s build a directory of WHL hockey arenas

๏ Content type for teams

๏ Fields for arena name and location (latitude and longitude) and team logo

๏ View to list teams

17

Page 18: App-ify drupal

How it looks online

18

Page 19: App-ify drupal

Services browser

๏ admin/services/browse

๏ List the servers and services available to us

๏ Document the required and optional arguments

๏ Preview the data returned by the service

19

Page 20: App-ify drupal

Let’s build an app

20

Page 21: App-ify drupal

What’s missing?

21

๏ Saving nodes or comments back to the site.

๏ User authentication

๏ Really, we should create a service user and role, then always authenticate

Page 22: App-ify drupal

Further reading

๏ Existing Drupal/Titanium API Resources(http://groups.drupal.org/node/81519)

๏ Appcelerator API Documentation(http://developer.appcelerator.com/apidoc/mobile/latest)

๏ Titanium API Drupal Group(http://groups.drupal.org/titanium-api)

22

Page 24: App-ify drupal

Questionswww.jdschroeder.ca

24