• Save
Drupal X PhoneGap - Building Mobile Applications with Drupal
Upcoming SlideShare
Loading in...5
×
 

Drupal X PhoneGap - Building Mobile Applications with Drupal

on

  • 5,268 views

Drupal X PhoneGap - Building Mobile Applications with Drupal

Drupal X PhoneGap - Building Mobile Applications with Drupal

2012/07/07 @ DrupalCamp Taipei

Statistics

Views

Total Views
5,268
Views on SlideShare
5,267
Embed Views
1

Actions

Likes
6
Downloads
0
Comments
1

1 Embed 1

https://twimg0-a.akamaihd.net 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Drupal X PhoneGap - Building Mobile Applications with Drupal Drupal X PhoneGap - Building Mobile Applications with Drupal Presentation Transcript

  • Drupal X PhoneGap Building Mobile Applications with Drupal Kuro Hsu @ DrupalCamp Taipei 2012/07/07
  • Kuro Hsu (a.k.a kurotanshi) • A Front-End Engineer. • Admin of PhoneGap TW Community Page - http://www.facebook.com/PhoneGapTW • Admin of PhoneGap CN forum - http://bbs.phonegapcn.com/forum.php • An amateur Drupaler. 
  • Why ?
  • Mobile is Growing
  • Android Java BlackBerry Java iOS Objective-C Palm OS C, C++, Pascal Symbian C++ Windows Phone C#Mobile development is mess.
  • Web vs. Native Web Native Dev Cost Reasonable Expensive Dev Time Short Long Portability High None Performance Fast Very Fast Native Functionality No All App Store Distribution No Yes Extensible No Yes
  • Welcome To Facebook
  • Web vs. Hybrid vs. Native Web Hybrid Native Dev Cost Reasonable Reasonable Expensive Dev Time Short Short Long Portability High High None Performance Fast Fast Very Fast Native Functionality No Yes All App Store Distribution No Yes Yes Extensible No Yes Yes
  • PhoneGap
  • What is PhoneGap / Cordova ? • Basically just a webkit browser with all the chrome removed, even the menu bar, and dose everything a browser does.
  • What is PhoneGap / Cordova ? • Basically just a webkit browser with all the chrome removed, even the menu bar, and dose everything a browser does.
  • What is PhoneGap / Cordova ? • PhoneGap is an HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. PhoneGap leverages web technologies developers already know best... HTML and JavaScript.
  • How does PhoneGap work?• 1. Write a web app using HTML5 technologies: HTML5 / CSS / JS
  • How does PhoneGap work?• 2. Package your web app into PhoneGap
  • How does PhoneGap work?• 2. Package your web app into PhoneGap
  • How does PhoneGap work?• 3. Deploy your Native App to multiple devices ( iOS, Android, Blackberry, WP 7..., and so on. )
  • PhoneGap API / Plugins: Accelerometer Events Camera File Capture Geolocation Compass Media Connection Notification Contacts Storage Device
  • Local App ? Internet !!
  • Drupal is the best choice!
  • Requirement Services - http://drupal.org/project/services Views - http://drupal.org/project/views Views datasource - http://drupal.org/project/views_datasource Chaos tools - http://drupal.org/project/ctools SPYC - http://code.google.com/p/spyc/
  • Setting - Service
  • Setting - Service
  • Setting - Views
  • {"sessid":"abcdefghijklmnopqrstuvwxyandznowiknowmyabcsnexttimewontyousingwithme", "user":{ "uid":0, "hostname":"127.0.0.1", "roles":{ "1":"anonymous user" }, "cache":0, "session":"", "timestamp":"1321994670" }}
  • $.ajax({ url: "http://10.0.2.2/Drupal/?q=services/system/connect.json", type: post, dataType: json, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(failed to system connect); }, success: function (data) { var drupal_user = data.user; if (drupal_user.uid == 0) { // user is not logged in. } else{ // user is logged in, do something. }});
  • Demo !
  • Conclusion
  • Thanks ! Kuro Hsu kurotanshi @ gmail.com http://kuro.tw https://twitter.com/kurotanshi http://www.plurk.com/kurotanshi http://www.facebook.com/kurotanshi