PhoneGap

Now and the Future
About Me
 •   Tim Kim
 •   Dev at Adobe/Nitobi
 •   @timkim
 •   timk@adobe.com
 •   <3 JS, SC2, and movies
What is PhoneGap?




A way to build cross platform native applications using web technologies
What is PhoneGap?




1) Write a web app using HTML5 technologies
                JS/HTML/CSS
What is PhoneGap?




2) Package your web app into PhoneGap
    Common device interface: PhoneGap API
         Extend: PhoneGap PlugIns
What is PhoneGap?




   3) Deploy to multiple devices
  iOS, Android, Blackberry, WP7, WebOS, …
What is PhoneGap?
PhoneGap API:
  • An interface to the most common set of
     device functionality

  • Contacts, GeoLocation, File, Camera, etc…

  • All accessible through JS

  • docs.phonegap.com
What is PhoneGap?
PhoneGap API:
  Geolocation:

     var win = function(position) { console.log(position.coords) }
     , fail = console.log(‘I failed’);

              navigator.geolocation.getCurrentPostion(win, fail)
What is PhoneGap?
PhoneGap API:
  Vibration:

     navigator.vibrate(1000)

     navigator.vibrate([1000])

     navigator.vibrate([1000, 500, 2000])
What is PhoneGap?
PhoneGap API:
  App life cycle events:
     document.addEventListener('deviceready', appInit, false)
          document.addEventListener('pause', appPause, false)
          document.addEventListener('resume', appResume, false)

           var appInit = function() {
             alert('app initd')
           }

           var appPause = function() {
             alert('paused')
           }

           var appResume = function() {
             alert('resume')
           }
What is PhoneGap?
PhoneGap PlugIns:
  • A way to extend your PhoneGap app if you want
     to access more than what the PhoneGap API
     provides

  • Process: Write a native implementation then use
    JS to call that native function (Cordova JS!)

  • Currently a work in progress but check out
    https://github.com/phonegap/phonegap-plugins
What is PhoneGap?
PhoneGap PlugIns:
  Some examples:
  •    Child Browser
  •    In App Purchasing
  •    Barcode scanner
  •    Twitter
Why PhoneGap?
Why PhoneGap?
     • Need a dev who knows the platform

     • Multiple code bases

     • Longer turn around time to get releases out
       to all platforms
Why PhoneGap?


Write Once Debug Everywhere
Why PhoneGap?




  PhoneGap Build
Why PhoneGap?
     •   Upload your app to PhoneGap then
         build and compile in the cloud

     •   No need to download sdks

     •   Free open beta right now
         build.phonegap.com
Who Makes PhoneGap?
      •   Nitobi/Adobe
      •   IBM, RIM, Microsoft
      •   Various individual contributors
      •   Apache
How to Use PhoneGap
• Demo
Where Are We Going?
        • PhoneGap donated to the apache
          foundation!

        • Now exists under the name Cordova

        • Contribute back today:
          incubator.apache.org/cordova/
Where Are We Going?
The Adobe years:

  The original creators of PG – Nitobi aquired by Adobe
     • No more client work! Full time work on PhoneGap


  Integration with other Adobe products
     • DreamWeaver
     • And more…
Where Are We Going?
• Apache Licensed – free and open source

• Our device api specs follow wc3 standards

• If browsers ever decide to implement the wc3 specs, then
  your app is future proofed
Where Are We Going?
• Cordova JS/Unified JS:
  • Fragmentation started to creep into PhoneGap.js
    as more platforms added

  • Now we use a modular syntax to define PG
    components

  • Everything is a plugin now
Where Are We Going?
• Cordova JS/Unified JS:
  Easy to add new platforms or extend an existing
  platform

  Wishing for installable, discoverable, removable
  plugins
     • Similar to NPM
     • Command line tooling soon!
Where Are We Going?
Concerns:
  •   Security
  •   Privacy
  •   Permissions
  •   Capabilities
  •   Performance
Where Are We Going?
More device support:
     •   Ios
     •   Android
     •   BlackBerry 5+
     •   webOS
     •   WP7
     •   Bada
     •   …What’s next?
Thank you!

PhoneGap - Now and the Future

  • 1.
  • 2.
    About Me • Tim Kim • Dev at Adobe/Nitobi • @timkim • timk@adobe.com • <3 JS, SC2, and movies
  • 3.
    What is PhoneGap? Away to build cross platform native applications using web technologies
  • 4.
    What is PhoneGap? 1)Write a web app using HTML5 technologies JS/HTML/CSS
  • 5.
    What is PhoneGap? 2)Package your web app into PhoneGap Common device interface: PhoneGap API Extend: PhoneGap PlugIns
  • 6.
    What is PhoneGap? 3) Deploy to multiple devices iOS, Android, Blackberry, WP7, WebOS, …
  • 7.
    What is PhoneGap? PhoneGapAPI: • An interface to the most common set of device functionality • Contacts, GeoLocation, File, Camera, etc… • All accessible through JS • docs.phonegap.com
  • 8.
    What is PhoneGap? PhoneGapAPI: Geolocation: var win = function(position) { console.log(position.coords) } , fail = console.log(‘I failed’); navigator.geolocation.getCurrentPostion(win, fail)
  • 9.
    What is PhoneGap? PhoneGapAPI: Vibration: navigator.vibrate(1000) navigator.vibrate([1000]) navigator.vibrate([1000, 500, 2000])
  • 10.
    What is PhoneGap? PhoneGapAPI: App life cycle events: document.addEventListener('deviceready', appInit, false) document.addEventListener('pause', appPause, false) document.addEventListener('resume', appResume, false) var appInit = function() { alert('app initd') } var appPause = function() { alert('paused') } var appResume = function() { alert('resume') }
  • 11.
    What is PhoneGap? PhoneGapPlugIns: • A way to extend your PhoneGap app if you want to access more than what the PhoneGap API provides • Process: Write a native implementation then use JS to call that native function (Cordova JS!) • Currently a work in progress but check out https://github.com/phonegap/phonegap-plugins
  • 12.
    What is PhoneGap? PhoneGapPlugIns: Some examples: • Child Browser • In App Purchasing • Barcode scanner • Twitter
  • 13.
  • 14.
    Why PhoneGap? • Need a dev who knows the platform • Multiple code bases • Longer turn around time to get releases out to all platforms
  • 15.
    Why PhoneGap? Write OnceDebug Everywhere
  • 16.
    Why PhoneGap? PhoneGap Build
  • 17.
    Why PhoneGap? • Upload your app to PhoneGap then build and compile in the cloud • No need to download sdks • Free open beta right now build.phonegap.com
  • 18.
    Who Makes PhoneGap? • Nitobi/Adobe • IBM, RIM, Microsoft • Various individual contributors • Apache
  • 19.
    How to UsePhoneGap • Demo
  • 20.
    Where Are WeGoing? • PhoneGap donated to the apache foundation! • Now exists under the name Cordova • Contribute back today: incubator.apache.org/cordova/
  • 21.
    Where Are WeGoing? The Adobe years: The original creators of PG – Nitobi aquired by Adobe • No more client work! Full time work on PhoneGap Integration with other Adobe products • DreamWeaver • And more…
  • 22.
    Where Are WeGoing? • Apache Licensed – free and open source • Our device api specs follow wc3 standards • If browsers ever decide to implement the wc3 specs, then your app is future proofed
  • 23.
    Where Are WeGoing? • Cordova JS/Unified JS: • Fragmentation started to creep into PhoneGap.js as more platforms added • Now we use a modular syntax to define PG components • Everything is a plugin now
  • 24.
    Where Are WeGoing? • Cordova JS/Unified JS: Easy to add new platforms or extend an existing platform Wishing for installable, discoverable, removable plugins • Similar to NPM • Command line tooling soon!
  • 25.
    Where Are WeGoing? Concerns: • Security • Privacy • Permissions • Capabilities • Performance
  • 26.
    Where Are WeGoing? More device support: • Ios • Android • BlackBerry 5+ • webOS • WP7 • Bada • …What’s next?
  • 27.