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
340
50 Shades of Flux
pukhalski
3
440
Why Mobile Web Still Sucks
pukhalski
3
590
Responsive Typography: Wrap-Up
pukhalski
8
470
Next Level SVG
pukhalski
1
1.8k
XFramework: the story so far
pukhalski
0
530
XFramework: build cross-platform responsive web apps easily
pukhalski
3
1.1k
Mobile Cross-Platform Development
pukhalski
2
370
Rest in PS: рабочий процесс современного веб-дизайнера
pukhalski
12
1.6k
Other Decks in Programming
See All in Programming
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
130
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
370
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
180
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
130
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
180
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
310
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
120
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
51
31k
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
120
AIの中の人になってみる
htkym
0
150
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Utilizing Notion as your number one productivity tool
mfonobong
4
560
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
310
New Earth Scene 8
popppiees
3
2.5k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
The Curse of the Amulet
leimatthew05
2
14k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
430
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
550
Crafting Experiences
bethany
1
270
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
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