Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How PhoneGap really works
Search
Ilya Pukhalski
February 12, 2013
Programming
1k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How PhoneGap really works
PhoneGap (PhoneGap API's, PhoneGap plugins, PhoneGap Build) from behind
Ilya Pukhalski
February 12, 2013
More Decks by Ilya Pukhalski
See All by Ilya Pukhalski
There's a bot for that
pukhalski
1
330
50 Shades of Flux
pukhalski
3
430
Why Mobile Web Still Sucks
pukhalski
3
580
Responsive Typography: Wrap-Up
pukhalski
8
460
Next Level SVG
pukhalski
1
1.8k
XFramework: the story so far
pukhalski
0
520
XFramework: build cross-platform responsive web apps easily
pukhalski
3
1.1k
Mobile Cross-Platform Development
pukhalski
2
360
Rest in PS: рабочий процесс современного веб-дизайнера
pukhalski
12
1.6k
Other Decks in Programming
See All in Programming
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
150
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
140
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.4k
LLM Plugin for Node-REDの利用方法と開発について
404background
0
160
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
190
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
610
Oxcを導入して開発体験が向上した話
yug1224
4
290
3Dシーンの圧縮
fadis
1
650
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
500
GitHub Copilot CLIのいいところ
htkym
2
1.3k
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
320
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
450
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
550
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
GitHub's CSS Performance
jonrohan
1033
470k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
600
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Side Projects
sachag
455
43k
Transcript
Ilya Pukhalski, EPAM SEC 2013 PHONEGAP How really works
@witchfinderx 2 Ilya Pukhalski, EPAM Mobile Competency Center
WHAT WILL WE DISCUSS? 3
— That mobile mobile world... — What is PhoneGap? -
A brief history of PhoneGap - How PhoneGap works - PhoneGap APIs - Plugins - Cons and limitations — PhoneGap Build — The future is closer than you think 4
THAT MOBILE MOBILE WORLD... 5
6 June, 2007
7 +
8 July 10, 2008
9 One of the main world problems today
Everything is WEB 10
11 What's in common?
12 All of them have a browser
PHONEGAP 13
PhoneGap is an open source framework that enables to build
cross-platform hybrid mobile applications using web technologies (HTML, CSS, JavaScript). 14
PhoneGap 2.3.0 15
HISTORY OF PHONEGAP 16
iPhoneDevCamp 2008 17 PhoneGap 1.0 2009 Migration to Apache Cordova
2012 IBM get involved into development late 2009 PhoneGap Build official launch late 2012
HOW PHONEGAP WORKS 18
19
20
21
22
None
24
25 PhoneGap Build Process
PHONEGAP API'S 26
27 — Accelerometer — Camera — Compass (excl. iPhone 3/3G,
BlackBerry OS 5+ and Symbian) — Contacts (excl. WebOS) — File (excl. WebOS, Symbian, Bada) — Geolocation — Media (excl. BlackBerry OS 5+, WebOS, Symbian, Bada) — Network — Notification — Storage (excl. Bada)
28
29 API call example `navigator' is a global namespace for
all API calls
HELLO WORLD 30
Including cordova.js
32 Adding listener on "deviceready"event
33 showAlert(); will display a native notification
34 Show notification as soon as device is ready
PLUGINS 35
36
37 HelloWorld.js
38 PhoneGap Bridge exec call
39 PhoneGap Bridge exec call Cordova.exec bridge CDV-HelloWorld.js
40 CLI for plugin boilerplate
41 CLI for plugin boilerplate
42 iOS native code #import <Cordova/CDVPlugin.h> @interface HelloWorld : CDVPlugin
@end #import "HelloWorld.h" @implementation HelloWorld @end HelloWorld.h HelloWorld.m Inheritance
43 Adding methods #import <Cordova/CDVPlugin.h> @interface HelloWorld : CDVPlugin -
(void)add:(CDVInvokedUrlCommand*)command; @end #import "HelloWorld.h" @implementation HelloWorld - (void)add:(CDVInvokedUrlCommand*)command { } @end HelloWorld.h HelloWorld.m Instance method Instance method
44 Retrieving arguments #import "HelloWorld.h" @implementation HelloWorld - (void)add:(CDVInvokedUrlCommand*)command {
double a = [[command.arguments objectAtIndex:0] doubleValue]; double b = [[command.arguments objectAtIndex:1] doubleValue]; double result = a + b; } @end HelloWorld.m Retrieve arguments; Addition.
45 Sending the result #import "HelloWorld.h" @implementation HelloWorld - (void)add:(CDVInvokedUrlCommand*)command
{ double a = [[command.arguments objectAtIndex:0] doubleValue]; double b = [[command.arguments objectAtIndex:1] doubleValue]; double result = a + b; CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDouble:result]; [self writeJavascript: [pluginResult toSuccessCallbackString:command.callbackId]]; } @end HelloWorld.m Send result back
46 Adding plugin mapping to Cordova.plist
47 Calling our plugin from JS
CONS & LIMITATIONS 48
— Fast changing inconsistent API — Lacks and inaccuracies in
documentation — Some device specific API's are still unavailable for some OS — Dealing with cross-platform web development issues 49
PHONEGAP BUILD 50
51 PhoneGap Build is a cloud based service built on
the top of PhoneGap framework.
— PhoneGap Build is a cloud service — PhoneGap Build
API can help in establishing CI — No need to have different environment OS and SDK's to build an application 52 PhoneGap Build Pros
THE FUTURE IS CLOSER THAN YOU THINK 53
Some API's are already accessible 54
55 Device Specific API's accessibility: Accelerometer
Device Specific API's accessibility: File API (incl. camera uploads)
Average support is ~70%
58 https://vimeo.com/55486684 Sencha Fastbook
QUESTIONS? 59
@witchfinderx 60
@witchfinderx 60