svcc drupal+iphone
DESCRIPTION
Presentation on Drupal+iPhone given at Silicon Valley Code Camp 2009 by Eneko Alonso.TRANSCRIPT
Eneko AlonsoI am a Software Engineer and UI Developer,
currently working at Level Studiosealonso@level-studios.comwww.level-studios.comwww.enekoalonso.com
Eneko [email protected]
DRUPAL
Eneko [email protected]
Drupal: what is it?
• Content Management System• Community (user management, roles,
permissions)• Base for great web applications
Check out www.drupal.org
Eneko [email protected]
iPhone
Eneko [email protected]
iPhone: what is it?
Eneko [email protected]
Drupal + iPhoneWhy?
Eneko [email protected]
Drupal+iPhone: why?
Let your users access your site on the goBut also, great for administration
Eneko [email protected]
Setup: what do we need?
Eneko [email protected]
Drupal: what we need
Drupal site:• [X]AMP Server (PHP, Apache, MYSQL)• Drupal distribution (6.14 in this demo)
JSON API:• Services Module• JSON Server Module
Eneko [email protected]
iPhone: what we need
1. XCode with iPhone SDK (3.0 on this demo)2. TouchJSON library
http://developer.apple.com/iphone/http://code.google.com/p/touchcode/wiki/TouchJSON
Eneko [email protected]
iPhone: what we don’t need
1. iPhone Developer License*
* Needed only to put your app in your iPhone for testing.
http://developer.apple.com/iphone/http://code.google.com/p/touchcode/wiki/TouchJSON
Eneko [email protected]
Setup
Eneko [email protected]
Create a user account on the site:http://[server_ip]/user/register
Write a new story:http://[server_ip]/node/add/story
On XCode 3.1, create a new iPhone project
Eneko [email protected]
Demo Setup
Drupal Setup
1. Create DB: CREATE DATABASE drupal_iphone_demo;
2. Download drupal: wget http://drupal.org/…
3. Install drupal (browse to your server url)4. Install and enable modules (Services)5. Configure user permissions
Eneko [email protected]
iPhone Setup
1. Create new Project2. Add JSON library to project (TouchJSON)3. Add a button to the view4. Add a method for system.connect5. Execute server request and show data on
console
Eneko [email protected]
API Calls
Eneko [email protected]
system.connect
Initiates user sessionServer returns valid sessionId for login
Eneko [email protected]
Creating custom services
Eneko [email protected]