Building mobile apps with JavaScript and PHP

10,629 views
10,311 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
10,629
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
119
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Building mobile apps with JavaScript and PHP

  1. 1. Mobile apps with JavaScript and PHP Ed Finkler Fictive Kin @funkatron http://funkatron.com http://joind.in/3389Thursday, May 26, 2011
  2. 2. Me • I work on Gimme Bar (http://gimmebar.com) • I work on Spaz (http://getspaz.com) • Sometimes I write PHP, sometimes I write JavaScriptThursday, May 26, 2011
  3. 3. Why JavaScript? • Offers the best option for cross-platform mobile dev • strong, diverse community, good tools • deployable from server or locally-installedThursday, May 26, 2011
  4. 4. Most options are JavaScript + HTML + CSSThursday, May 26, 2011
  5. 5. Strong webkit implementations on most platforms • iOS • Android • webOS • BlackBerry • SymbianThursday, May 26, 2011
  6. 6. Deploy on server: • limits your access to device functionality • far easier to updateThursday, May 26, 2011
  7. 7. Deploy on device • access more platform-specific functionality • updating can be a painThursday, May 26, 2011
  8. 8. Shim libraries bridge JS and device functionality • HP Palm webOS special case – all apps build on JS/HTML/CSSThursday, May 26, 2011
  9. 9. Options for device deployment • PhoneGap • Titanium MobileThursday, May 26, 2011
  10. 10. PhoneGap • Wrapper + shim layer – very basic, works on several platforms • Much more flexible; lets you pick any approach for building the app • Potentially slower; less access to platform-specific APIs • http://www.phonegap.com/Thursday, May 26, 2011
  11. 11. PhoneGap device API support (varies by device) • Accelerometer • Geoloc • Camera • Media • Compass • Network connectivity • Contacts • Notications • Device Info • Storage • Native Events • Plugins can add additional https://github.com/purplecabbage/ • File phonegap-pluginsThursday, May 26, 2011
  12. 12. PhoneGap + Your preferred approach • Lots of JS DOM frameworks work well in PhoneGap • jo (http://joapp.com) • jQuery Mobile (http://jquerymobile.com) • Enyo (http://developer.palm.com/) • Sencha Touch (http://www.sencha.com/products/touch/) • Many more!Thursday, May 26, 2011
  13. 13. Titanium Mobile • Full-stack, access to native UI components via JavaScript. Works on Android and iOS. • Potentially faster • Anecdotally, can be kinda buggy • http://www.appcelerator.com/Thursday, May 26, 2011
  14. 14. Titanium Mobile device API support • Similar base support to PhoneGap, plus • Android Calendar • Facebook APIs • Map • XML • Yahoo APIs • Plugins can add additional functionality; can be written in native codeThursday, May 26, 2011
  15. 15. Spaz in Enyo • Dev in Chrome • Test with emulator VM • We can build really fast with thisThursday, May 26, 2011
  16. 16. Server Side: PHP • You can build your server side stuff lots of ways • Pick what works for you and STFU • Some simple FWs • koi • slim • breeze • limonade • glue • flightThursday, May 26, 2011
  17. 17. RESTful implementations with JSON responses work best • Make a simple HTTP call w/ basic query data • respond with JSON structure • https://www.ibm.com/developerworks/webservices/library/ws-restful/Thursday, May 26, 2011
  18. 18. FRAPI • A great framework for rapidly building RESTful APIs • Using it at Gimme BarThursday, May 26, 2011
  19. 19. Examples! • WildGarlic • in Jo • in jQueryMobile + Backbone.js • in EnyoThursday, May 26, 2011
  20. 20. Examples! • FRAPI • api.getspaz.comThursday, May 26, 2011
  21. 21. Code from examples • http://getfrapi.com • https://github.com/funkatron/wildgarlic • https://github.com/funkatron/WildGarlic-jqmobile • https://github.com/funkatron/Spaz-Web-APIsThursday, May 26, 2011
  22. 22. Q&A • Axe me • http://joind.in/3389Thursday, May 26, 2011

×