PhoneGap - Now and the Future
-
Upload
tim-kim -
Category
Technology
-
view
2.578 -
download
0
description
Transcript of PhoneGap - Now and the Future
![Page 1: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/1.jpg)
PhoneGap
Now and the Future
![Page 3: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/3.jpg)
What is PhoneGap?
A way to build cross platform native applications using web technologies
![Page 4: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/4.jpg)
What is PhoneGap?
1) Write a web app using HTML5 technologiesJS/HTML/CSS
![Page 5: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/5.jpg)
What is PhoneGap?
2) Package your web app into PhoneGapCommon device interface: PhoneGap API
Extend: PhoneGap PlugIns
![Page 6: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/6.jpg)
What is PhoneGap?
3) Deploy to multiple devicesiOS, Android, Blackberry, WP7, WebOS, …
![Page 7: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/7.jpg)
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
![Page 8: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/8.jpg)
What is PhoneGap?PhoneGap API:
Geolocation:
var win = function(position) { console.log(position.coords) }, fail = console.log(‘I failed’);
navigator.geolocation.getCurrentPostion(win, fail)
![Page 9: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/9.jpg)
What is PhoneGap?PhoneGap API:
Vibration:
navigator.vibrate(1000)
navigator.vibrate([1000])
navigator.vibrate([1000, 500, 2000])
![Page 10: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/10.jpg)
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') }
![Page 11: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/11.jpg)
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
![Page 12: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/12.jpg)
What is PhoneGap?PhoneGap PlugIns:
Some examples:• Child Browser• In App Purchasing• Barcode scanner• Twitter
![Page 13: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/13.jpg)
Why PhoneGap?
![Page 14: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/14.jpg)
Why PhoneGap?• Need a dev who knows the platform
• Multiple code bases
• Longer turn around time to get releases out to all platforms
![Page 15: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/15.jpg)
Why PhoneGap?
Write Once Debug Everywhere
![Page 16: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/16.jpg)
Why PhoneGap?
PhoneGap Build
![Page 17: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/17.jpg)
Why PhoneGap?• Upload your app to PhoneGap
then build and compile in the cloud
• No need to download sdks
• Free open beta right nowbuild.phonegap.com
![Page 18: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/18.jpg)
Who Makes PhoneGap?
• Nitobi/Adobe• IBM, RIM, Microsoft• Various individual contributors• Apache
![Page 19: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/19.jpg)
How to Use PhoneGap
• Demo
![Page 20: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/20.jpg)
Where Are We Going?• PhoneGap donated to the apache
foundation!
• Now exists under the name Cordova
• Contribute back today: incubator.apache.org/cordova/
![Page 21: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/21.jpg)
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…
![Page 22: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/22.jpg)
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
![Page 23: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/23.jpg)
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
![Page 24: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/24.jpg)
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!
![Page 25: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/25.jpg)
Where Are We Going?
Concerns:• Security• Privacy• Permissions• Capabilities• Performance
![Page 26: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/26.jpg)
Where Are We Going?
More device support:• Ios• Android• BlackBerry 5+• webOS• WP7• Bada• …What’s next?
![Page 27: PhoneGap - Now and the Future](https://reader036.fdocuments.net/reader036/viewer/2022070313/55495a62b4c905f74e8b5301/html5/thumbnails/27.jpg)
Thank you!