If this year is all about the mobile space maturing, then your web skills are where it’s at and a key player is PhoneGap, which supercharges your code and gets you into the app store(s).
We look at one small framework’s journey from birth at a 2 day hacking event to become the preeminent method for distributing packaged web apps on mobile devices. We will have a look at the all the goodies that PhoneGap provides, then peek inside and see how it integrates with the web stack. We will explore some of the pain points and work arounds. Then, we take a quick pass through the community and resources available. Finally, we finishing up with a look at where PhoneGap is going and explore the interesting places your web dev skills could take you in the next 12 months.
5. The Problem
Apple iOS Objective-C
HTC, Samsung
Android Java
Others
RIM Blackberry OS 4 Java
Several WinPhone 7 VB.NET / Silverlight
Nokia Symbian C++ Java Flash?
Palm webOS Javascript
6. The Soap Opera
Apple iOS Objective-C
Motorola
Android Java
Lots More
RIM Blackberry OS 5+ C++ ?
Nokia, Others WinMobile7.5 VB.NET / Silverlight
? Symbian C++ Java Flash?
HP webOS Javascript
7. The Soap Opera
Apple iOS Objective-C
Motorola
Android Java
Lots More
RIM Blackberry OS 5+ C++ ?
Nokia, Others WinMobile7.5 VB.NET / Silverlight
? Symbian C++ Java Flash?
HP webOS Javascript
8.
9. Web vs Native
Web Native
Dev Cost Reasonable Expensive
Dev Time Short Long
App Portability High None
Performance Fast Very Fast
Native Functionality No All
App Store Distribution No Yes
Extensible No Yes
10. Web vs Hybrid vs Native
Web Hybrid Native
Dev Cost Reasonable Reasonable Expensive
Dev Time Short Short Long
App Portability High High None
Performance Fast Fast Very Fast
Native Functionality No Yes All
App Store Distribution No Yes Yes
Extensible No Yes Yes
31. How it actually works
Web Tech Not Web Tech
Native Web
Control
32. How it actually works
Web Tech Not Web Tech
Native Web
Control FFI
33. How it actually works
Web Tech Not Web Tech
Common Plugins
Accelerometer
Camera
Capture
Connection
Contacts
Native Web File
Geolocation
Control FFI Notification
Storage ...
Custom Plugins
Badge
Barcode Scanner
Bluetooth
InAppPurchaseManager...
35. The Native Web Control
Basically just a browser...
with all the chrome removed
36. The Native Web Control
Basically just a browser...
with all the chrome removed
even the top bar
37. The Native Web Control
Basically just a browser...
with all the chrome removed
even the top bar
does everything a browser does
38. Uses Platforms Native Control
iOS Android Blackberry webOS Symbian
WebKit
532.9 WebKit WebKit WebKit
WebKit
WebCore with V8 with Piranah S60 or Qt?
JavascriptCore
39. Uses Platforms Native Control
iOS Android Blackberry webOS Symbian WinPhone 7.0
WebKit
532.9 WebKit WebKit WebKit
with V8
WebKit with Piranah S60 or Qt?
IE 7
WebCore
JavascriptCore
40. Uses Platforms Native Control
iOS Android Blackberry webOS Symbian WinPhone 7.5
WebKit
532.9 WebKit WebKit WebKit
with V8
WebKit with Piranah S60 or Qt?
IE 9
WebCore
JavascriptCore
41. Uses Platforms Native Control
iOS Android Blackberry webOS Symbian WinPhone 7.5
WebKit
532.9 WebKit WebKit WebKit
with V8
WebKit with Piranah S60 or Qt?
IE 9
WebCore
JavascriptCore
42. How it actually works
Web Tech Not Web Tech
Common Plugins
Accelerometer
Camera
Capture
Connection
Contacts
Native Web File
Geolocation
Control FFI Notification
Storage ...
Custom Plugins
Badge
Barcode Scanner
Bluetooth
InAppPurchaseManager...
43. What the FFI?
• Foreign Function Interface
• aka, the Bridge
• aka the Mighty Hack
51. The Two Commandments
• bring unto me your data,
as long as it can be stringified
• Let no API method exist unless it doth
require a callback
52. How it actually works
Web Tech Not Web Tech
Common Plugins
Accelerometer
Camera
Capture
Connection
Contacts
Native Web File
Geolocation
Control FFI Notification
Storage ...
Custom Plugins
Badge
Barcode Scanner
Bluetooth
InAppPurchaseManager...
53. Accessing Native APIs
PhoneGap Web App Mobile OS Hardware
Native API Sensors
Web App PhoneGap Plugins Graphics
FFI OS API Network
Javascript
DOM
CSS
Resources
Native Web View
Browser OS API
54. Aside: The ‘Gap’
PhoneGap Web App Mobile OS Hardware
Native API Sensors
Web App PhoneGap Plugins Graphics
The ‘Gap’
FFI OS API Network
Javascript
DOM
CSS
Resources
Native Web View
Browser OS API
55. Aside: The ‘Gap’
Mobile OS Hardware
Native API Sensors
Web App Browser Graphics
Network
Javascript
DOM
Browser OS API
CSS
Resources
56. Aside: The ‘Gap’
Mobile OS Hardware
Native API Sensors
Web App “The Browsergoal
secondof PhoneGap is Graphics
Network
Javascript for the project to cease to exist”
DOM
Browser OS API
CSS • Use W3C Published standards where available
Resources • Provide a reference implementation
57. Plugins
• All API features are plugins
• Common Plugins
• Good support across platforms
• Custom Plugins
• Terrible support across platforms
• Make your own!
58. W3C Compatible Spec Status
Accelerometer No Working Draft
Camera Complex
Capture Yes Working Draft
Compass No Working Draft
Connection Almost Working Draft
Contacts Yes Last Call
Device
Events
File Yes Working Draft
Geolocation Yes Candidate Recommendation
Media No Last Call
Notification No Working Draft
Storage Yes Last Call / Retired
saas provider, construction industry\nagile, long term strategy to move our platform to the mobile\n
mobile app we are developing\narchitecture\n
So which languages to learn?\nObjective-C is the most obvious,\nJava - each platform has a different API\nc++, silverlight, flash: no thanks\n
Palm sold webOS to HP\nHP fired their CEO\nAndroid bought Motorola\nHTC, Samsung and others are worried\niOS still strong but not sharing\nAmazon just forked Android and has it’s own app store.\n
\n
\n
\n
\n
\n
\n
July 2008, App Store opens.\nNitobi - Brock Whitten, Brian LaRoux\nMacromedia, San Fransisco\n
July 2008, App Store opens.\nNitobi - Brock Whitten, Brian LaRoux\nMacromedia, San Fransisco\n
July 2008, App Store opens.\nNitobi - Brock Whitten, Brian LaRoux\nMacromedia, San Fransisco\n
July 2008, App Store opens.\nNitobi - Brock Whitten, Brian LaRoux\nMacromedia, San Fransisco\n
2009 - works directly with Sony/Ericsson on Symbian\n\n
2009 - works directly with Sony/Ericsson on Symbian\n\n
2009 - works directly with Sony/Ericsson on Symbian\n\n
Emerging Technology Group\nassign 5 devs full time iOS, Android, BB5/6\nEnsure success\n
Specific plugins for clients - open sourced\nRIM guys came out for a week to work on BB 5.0\n\n
Very successful release\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
iOS uses the WebCore and JavascriptCore technologies\nAndroid uses Googles V8 javascript engine’\nBlackberry is very similar to iOS\nwebOS uses a custom graphics engine Piranah\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
w3c accel and compass spec are complex\ncamera ~= capture\nnavigator.network.connection.type due to android bug\nmedia needs html5 audio & video api’s\n\n\n