What’s PhoneGap
   Why’s it Awesome
How to use it w/ Facebook
PhoneGap === Cordova

http://github.com/apache/incubator-cordova-*
PhoneGap Pattern


1. Embed a chromeless browser in a native app
2. Create a “bridge” between the browser and the native code
   providing access to native APIs
3. Write a web app
4. Package the web app with the native code and deploy to devices!
Write once debug everywhere
Take note

•   HTML, JS, CSS etc included in app package

•   HTML loaded on file:// URI scheme, no cross domain request
    restrictions

•   Engineering wise, approach is simple to extend to new
    platforms
Supported Platforms
iOS >= 3.2
Android >= 1.5
BlackBerry >= 4.6
webOS >= 1.4.5
Symbian >= 1
Windows Phone >= 7.5
Samsung Bada = 1
MIT/BSD/APACHE
Community
Contributors
       PhoneGap




         -- ohloh.net
Trends
    PhoneGap
Community Stuff

800,000     30,000     40+       50+          800,000
downloads   messages   tools   contributors   visits/month
Contributors
•   Adobe

•   IBM

•   Microsoft

•   RIM

•   HP/Palm

•   Salesforce.com
Thousands of Apps
Users
•   Alcatel-Lucent

•   Zynga

•   Microsoft

•   Travelocity

•   Vodafone

•   Wikipedia
Traction

•   ~15,000 PhoneGap apps in the App Store

•   Most popular categories?

    •   medical

    •   news

    •   business
Governance
PhoneGap === Cordova

http://github.com/apache/incubator-cordova-*
Mobile first!
HTML(5)
HTML(5)
Setup the Viewport
CSS3


-webkit-transform:
  translate3d(x,y,z) scale3D(1,1,1.0)
CSS Media Queries
Media Values


•   all
•   max-device-width: 480px
•   min-device-width: 481px

•   orientation: portrait
•   -webkit-min-device-pixel-ration: 2
General Tricks


•   window.devicePixelRatio
Startup
The Future

•   Tooling

•   WebGL

•   Facebook / LinkedIn / Walmart use case

•   Continue polyfilling HTML5
PhoneGap APIs


•   Sensors

•   Data

•   Events



               http://docs.phonegap.com
Tooling

•   Use any IDE

•   Use the platform emulators (at your peril)

•   Use Ripple emulator

•   Use Web Inspector Remote (Weinre)

•   Console.log and alert =(
Libraries

•   DOM

•   Testing

•   Style / GUI

•   Persistence
Plugins
How aboot some code?
http://tiny.cc/pg-fb
project resources
                    phonegap.com
                    docs.phonegap.com
                    wiki.phonegap.com
                    github.com/callback
                    groups.google.com/group/phonegap
                    #phonegap on freenode

                    @phonegap
                    @davejohnson



     thanks!

PhoneGap at Facebook Mobile Hack

Editor's Notes