SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
PhoneGap in 60
Minutes or Less
So Cal Code Camp, July 28, 2013
Saturday, July 27, 13
Who am I?
Hi, I’m Troy. I have been developing software for over 30
years. For the last 10 years I have been focused on web,
mobile web, and mobile development. I currently work at
Kelley Blue Book as a senior software engineer. My
opinions are my own.
I can be reached rockncoder@gmail.com
Saturday, July 27, 13
Please RateThisTalk
http://spkr8.com/t/23661
Saturday, July 27, 13
The Rock n Coder
• therockncoder.blogspot.com
• youtube.com/user/rockncoder
• slideshare.net/rockncoder
• https://github.com/Rockncoder
Saturday, July 27, 13
Agenda
• What is PhoneGap?
• Setting Up PhoneGap
• Hello PhoneGap
• Deploying to a Device
• Using Device Features (bridging the gap)
• Using JavaScript Libraries
Saturday, July 27, 13
Agenda (continue)
• PhoneGap Build
• Performance Tips
• Summary
Saturday, July 27, 13
What is PhoneGap?
Saturday, July 27, 13
What is PhoneGap?
PhoneGap is a free and open source framework
which allows you to create mobile apps using
standard web APIs.
Saturday, July 27, 13
What is the difference between
PhoneGap and Cordova?
Adobe donated PhoneGap to the Apache
Software Foundation under the name Apache
Cordova. So Cordova is the name of the open
source project and PhoneGap is the name of
Adobe's implementation of that project.There
are other implementations such as Telerik's
Icenium and IBM's Worklight.
Saturday, July 27, 13
Setting Up PhoneGap
Saturday, July 27, 13
Setting Up PhoneGap
• Install Node.js
• Install Device SDKs
• Install Cordova via npm
Saturday, July 27, 13
Install Cordova via npm
• npm is the Node Packaged Modules
• It is the standard method of distributing
node application modules
• The modules are written in JavaScript and
are cross platform
• sudo npm install -g cordova
Saturday, July 27, 13
Hello PhoneGap
Saturday, July 27, 13
Hello PhoneGap
• cordova create hello com.rnc.hello Hello
• create is the command
• hello is the name of the folder
• com.rnc.hello is the unique project name
• Hello is the human project name
Saturday, July 27, 13
Understanding the
Folder Format
• merges - where to place platform specific
code
• platforms - the source code for the
platform
• plugins - the applications plug ins
• www - the web version of the app
Saturday, July 27, 13
Adding Platforms
• Initially there are no platforms
• cordova platform add xxxx
• xxxx is the name of platform
• You MUST have the SDK installed and on
the path
Saturday, July 27, 13
Building the App
• cordova build - builds all of the platforms
• cordova build android - builds only the
android platform
Saturday, July 27, 13
Installing on a Device
• cordova run android
• Will install app to currently connected
android device
• Only Android is currently support
• To install iOS you will need Xcode
Saturday, July 27, 13
Using Device Features
Saturday, July 27, 13
Using Device Features
• The “deviceready” event must be received
before you can access device features
• Most device features access through the
navigator object
• Over a dozen major APIs supported as of
PhoneGap 3.0
Saturday, July 27, 13
API What it does
Accelerometer
Captures device motion in the x, y, and
z direction
Camera
The camera object provides access to
the device's default camera application
Compass
Obtains the direction that the device
is pointing
Contacts
The contacts object provides access
to the device contacts database
Geolocation
The geolocation object provides
access to location data based on the
device's GPS sensor or inferred from
network signals
Saturday, July 27, 13
Using JavaScript
Libraries
Saturday, July 27, 13
Using JavaScript
Libraries
• PhoneGap is compatible with nearly all
JavaScript libraries
• If it works on the web it works
• This includes, Sencha Touch, Backbone,
jQuery and jQuery Mobile...
Saturday, July 27, 13
jQuery Mobile
• PhoneGap lacks an innate UI
• jQuery Mobile can supply
• Must be sure that both libraries initialize
Saturday, July 27, 13
PhoneGap Build
Saturday, July 27, 13
What is phoneGap
Build?
PhoneGap Build is a cloud-based service built
on top of the PhoneGap framework. It allows
you to easily build those same mobile apps in
the cloud.
Saturday, July 27, 13
Why PhoneGap Build?
• Don't need Device SDKs
• Can Use Hydration
Saturday, July 27, 13
Using PhoneGap Build
• Signup for an account
• Can link to your GitHub account
• Open Source projects are free
• Private projects are charged, first one is
free
• Only git the www folder
Saturday, July 27, 13
Performance Tips
• At times performance can be sluggish
especially when combined with jQuery
Mobile
• Use event.preventDefault()
• Cache jQuery Selectors
• Minimize DOM interactions
Saturday, July 27, 13
Links
• http://phonegap.com/
• https://build.phonegap.com
• http://jquerymobile.com/
Saturday, July 27, 13
Summary
• PhoneGap is way to build mobile apps using
web APIs
• PhoneGap apps are cross platform by default
• PhoneGap build lets you build in the cloud
without installing lots of SDKs
• PhoneGap apps can be performance
challenged
Saturday, July 27, 13

Contenu connexe

En vedette

PhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsPhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsTechAhead
 
Brújula, Acelerómetro y Geolocalización con PhoneGap (Básico)
Brújula, Acelerómetro y Geolocalización con PhoneGap (Básico)Brújula, Acelerómetro y Geolocalización con PhoneGap (Básico)
Brújula, Acelerómetro y Geolocalización con PhoneGap (Básico)Jesús Fontecha
 
Aplicaciones móviles con Jquery Mobile, PHP y MySQL
Aplicaciones móviles con Jquery Mobile, PHP y MySQLAplicaciones móviles con Jquery Mobile, PHP y MySQL
Aplicaciones móviles con Jquery Mobile, PHP y MySQLfuturodelweb.com
 
PhoneGap @ Javascript Directions
PhoneGap @ Javascript DirectionsPhoneGap @ Javascript Directions
PhoneGap @ Javascript DirectionsTiang Cheng
 
A Sensorized and Health aspect-based framework to improve the continuous moni...
A Sensorized and Health aspect-based framework to improve the continuous moni...A Sensorized and Health aspect-based framework to improve the continuous moni...
A Sensorized and Health aspect-based framework to improve the continuous moni...Jesús Fontecha
 
Context-aware and user centered evaluation of assistive systems
Context-aware and user centered evaluation of assistive systemsContext-aware and user centered evaluation of assistive systems
Context-aware and user centered evaluation of assistive systemsJesús Fontecha
 
Phonegap cho người mới học
Phonegap cho người mới họcPhonegap cho người mới học
Phonegap cho người mới họcNgo Trung
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy stepsprince Loffar
 
Introducción a cloud computing
Introducción a cloud computingIntroducción a cloud computing
Introducción a cloud computingK35
 
Exploring the AmIHEALTH paradigm. Monitoring in Healthcare: Building mHealth ...
Exploring the AmIHEALTH paradigm. Monitoring in Healthcare: Building mHealth ...Exploring the AmIHEALTH paradigm. Monitoring in Healthcare: Building mHealth ...
Exploring the AmIHEALTH paradigm. Monitoring in Healthcare: Building mHealth ...Jesús Fontecha
 
Desarrollo de Apps con la herramienta Phonegap
Desarrollo de Apps con la herramienta PhonegapDesarrollo de Apps con la herramienta Phonegap
Desarrollo de Apps con la herramienta PhonegapCongresoWeb
 
A proposal for elderly frailty detection by using accelerometer-enabled smart...
A proposal for elderly frailty detection by using accelerometer-enabled smart...A proposal for elderly frailty detection by using accelerometer-enabled smart...
A proposal for elderly frailty detection by using accelerometer-enabled smart...Jesús Fontecha
 
Internet of Things. Definition of a concept
Internet of Things. Definition of a conceptInternet of Things. Definition of a concept
Internet of Things. Definition of a conceptJesús Fontecha
 

En vedette (18)

PhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsPhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native Components
 
Brújula, Acelerómetro y Geolocalización con PhoneGap (Básico)
Brújula, Acelerómetro y Geolocalización con PhoneGap (Básico)Brújula, Acelerómetro y Geolocalización con PhoneGap (Básico)
Brújula, Acelerómetro y Geolocalización con PhoneGap (Básico)
 
Aplicaciones móviles con Jquery Mobile, PHP y MySQL
Aplicaciones móviles con Jquery Mobile, PHP y MySQLAplicaciones móviles con Jquery Mobile, PHP y MySQL
Aplicaciones móviles con Jquery Mobile, PHP y MySQL
 
PhoneGap @ Javascript Directions
PhoneGap @ Javascript DirectionsPhoneGap @ Javascript Directions
PhoneGap @ Javascript Directions
 
PhoneGap - JavaScript for Mobile Apps
PhoneGap - JavaScript for Mobile AppsPhoneGap - JavaScript for Mobile Apps
PhoneGap - JavaScript for Mobile Apps
 
Introduccion al cluster
Introduccion al clusterIntroduccion al cluster
Introduccion al cluster
 
A Sensorized and Health aspect-based framework to improve the continuous moni...
A Sensorized and Health aspect-based framework to improve the continuous moni...A Sensorized and Health aspect-based framework to improve the continuous moni...
A Sensorized and Health aspect-based framework to improve the continuous moni...
 
PhoneGap Basics v1.0
PhoneGap Basics v1.0PhoneGap Basics v1.0
PhoneGap Basics v1.0
 
Context-aware and user centered evaluation of assistive systems
Context-aware and user centered evaluation of assistive systemsContext-aware and user centered evaluation of assistive systems
Context-aware and user centered evaluation of assistive systems
 
Android Basics v2.5
Android Basics v2.5Android Basics v2.5
Android Basics v2.5
 
Android basics v3
Android basics v3Android basics v3
Android basics v3
 
Phonegap cho người mới học
Phonegap cho người mới họcPhonegap cho người mới học
Phonegap cho người mới học
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy steps
 
Introducción a cloud computing
Introducción a cloud computingIntroducción a cloud computing
Introducción a cloud computing
 
Exploring the AmIHEALTH paradigm. Monitoring in Healthcare: Building mHealth ...
Exploring the AmIHEALTH paradigm. Monitoring in Healthcare: Building mHealth ...Exploring the AmIHEALTH paradigm. Monitoring in Healthcare: Building mHealth ...
Exploring the AmIHEALTH paradigm. Monitoring in Healthcare: Building mHealth ...
 
Desarrollo de Apps con la herramienta Phonegap
Desarrollo de Apps con la herramienta PhonegapDesarrollo de Apps con la herramienta Phonegap
Desarrollo de Apps con la herramienta Phonegap
 
A proposal for elderly frailty detection by using accelerometer-enabled smart...
A proposal for elderly frailty detection by using accelerometer-enabled smart...A proposal for elderly frailty detection by using accelerometer-enabled smart...
A proposal for elderly frailty detection by using accelerometer-enabled smart...
 
Internet of Things. Definition of a concept
Internet of Things. Definition of a conceptInternet of Things. Definition of a concept
Internet of Things. Definition of a concept
 

Similaire à PhoneGap in 60 Minutes or Less

From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEintelliyole
 
Introduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap BuildIntroduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap BuildMartin de Keijzer
 
jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep DiveTroy Miles
 
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Pro...
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyPro...(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyPro...
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Pro...宏治 高尾
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
Responsive Design and jQuery Mobile
Responsive Design and jQuery MobileResponsive Design and jQuery Mobile
Responsive Design and jQuery MobileTroy Miles
 
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)Murat Yener
 
PhoneGap in a Day
PhoneGap in a DayPhoneGap in a Day
PhoneGap in a DayTroy Miles
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010alunny
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)Hyun-woo Park
 
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Prog...
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyProg...(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyProg...
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Prog...宏治 高尾
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for EngineersBrian LeRoux
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapRamesh Nair
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Applitools
 
jQuery Mobile Jump Start
jQuery Mobile Jump StartjQuery Mobile Jump Start
jQuery Mobile Jump StartTroy Miles
 
Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's worldSudar Muthu
 
Let's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsLet's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsPaul Balogh
 
Let's unRiddle jsFiddle
Let's unRiddle jsFiddleLet's unRiddle jsFiddle
Let's unRiddle jsFiddlerhoward_blk
 

Similaire à PhoneGap in 60 Minutes or Less (20)

From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDE
 
Introduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap BuildIntroduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap Build
 
jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep Dive
 
Android introduccion2
Android introduccion2Android introduccion2
Android introduccion2
 
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Pro...
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyPro...(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyPro...
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Pro...
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Responsive Design and jQuery Mobile
Responsive Design and jQuery MobileResponsive Design and jQuery Mobile
Responsive Design and jQuery Mobile
 
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
 
PhoneGap in a Day
PhoneGap in a DayPhoneGap in a Day
PhoneGap in a Day
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
 
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Prog...
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyProg...(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyProg...
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Prog...
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
 
jQuery Mobile Jump Start
jQuery Mobile Jump StartjQuery Mobile Jump Start
jQuery Mobile Jump Start
 
Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's world
 
Let's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsLet's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeads
 
Let's unRiddle jsFiddle
Let's unRiddle jsFiddleLet's unRiddle jsFiddle
Let's unRiddle jsFiddle
 

Plus de Troy Miles

Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web ServersTroy Miles
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot CampTroy Miles
 
AWS Lambda Function with Kotlin
AWS Lambda Function with KotlinAWS Lambda Function with Kotlin
AWS Lambda Function with KotlinTroy Miles
 
React Native One Day
React Native One DayReact Native One Day
React Native One DayTroy Miles
 
React Native Evening
React Native EveningReact Native Evening
React Native EveningTroy Miles
 
Intro to React
Intro to ReactIntro to React
Intro to ReactTroy Miles
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN StackTroy Miles
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application TestingTroy Miles
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?Troy Miles
 
Angular Weekend
Angular WeekendAngular Weekend
Angular WeekendTroy Miles
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScriptTroy Miles
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in ClojureTroy Miles
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-upTroy Miles
 
The JavaScript You Wished You Knew
The JavaScript You Wished You KnewThe JavaScript You Wished You Knew
The JavaScript You Wished You KnewTroy Miles
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Troy Miles
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutesTroy Miles
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEANTroy Miles
 
A Quick Intro to ReactiveX
A Quick Intro to ReactiveXA Quick Intro to ReactiveX
A Quick Intro to ReactiveXTroy Miles
 

Plus de Troy Miles (20)

Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web Servers
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
 
AWS Lambda Function with Kotlin
AWS Lambda Function with KotlinAWS Lambda Function with Kotlin
AWS Lambda Function with Kotlin
 
React Native One Day
React Native One DayReact Native One Day
React Native One Day
 
React Native Evening
React Native EveningReact Native Evening
React Native Evening
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN Stack
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application Testing
 
ReactJS.NET
ReactJS.NETReactJS.NET
ReactJS.NET
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
 
Angular Weekend
Angular WeekendAngular Weekend
Angular Weekend
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-up
 
The JavaScript You Wished You Knew
The JavaScript You Wished You KnewThe JavaScript You Wished You Knew
The JavaScript You Wished You Knew
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutes
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEAN
 
A Quick Intro to ReactiveX
A Quick Intro to ReactiveXA Quick Intro to ReactiveX
A Quick Intro to ReactiveX
 

Dernier

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Dernier (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

PhoneGap in 60 Minutes or Less

  • 1. PhoneGap in 60 Minutes or Less So Cal Code Camp, July 28, 2013 Saturday, July 27, 13
  • 2. Who am I? Hi, I’m Troy. I have been developing software for over 30 years. For the last 10 years I have been focused on web, mobile web, and mobile development. I currently work at Kelley Blue Book as a senior software engineer. My opinions are my own. I can be reached rockncoder@gmail.com Saturday, July 27, 13
  • 4. The Rock n Coder • therockncoder.blogspot.com • youtube.com/user/rockncoder • slideshare.net/rockncoder • https://github.com/Rockncoder Saturday, July 27, 13
  • 5. Agenda • What is PhoneGap? • Setting Up PhoneGap • Hello PhoneGap • Deploying to a Device • Using Device Features (bridging the gap) • Using JavaScript Libraries Saturday, July 27, 13
  • 6. Agenda (continue) • PhoneGap Build • Performance Tips • Summary Saturday, July 27, 13
  • 8. What is PhoneGap? PhoneGap is a free and open source framework which allows you to create mobile apps using standard web APIs. Saturday, July 27, 13
  • 9. What is the difference between PhoneGap and Cordova? Adobe donated PhoneGap to the Apache Software Foundation under the name Apache Cordova. So Cordova is the name of the open source project and PhoneGap is the name of Adobe's implementation of that project.There are other implementations such as Telerik's Icenium and IBM's Worklight. Saturday, July 27, 13
  • 11. Setting Up PhoneGap • Install Node.js • Install Device SDKs • Install Cordova via npm Saturday, July 27, 13
  • 12. Install Cordova via npm • npm is the Node Packaged Modules • It is the standard method of distributing node application modules • The modules are written in JavaScript and are cross platform • sudo npm install -g cordova Saturday, July 27, 13
  • 14. Hello PhoneGap • cordova create hello com.rnc.hello Hello • create is the command • hello is the name of the folder • com.rnc.hello is the unique project name • Hello is the human project name Saturday, July 27, 13
  • 15. Understanding the Folder Format • merges - where to place platform specific code • platforms - the source code for the platform • plugins - the applications plug ins • www - the web version of the app Saturday, July 27, 13
  • 16. Adding Platforms • Initially there are no platforms • cordova platform add xxxx • xxxx is the name of platform • You MUST have the SDK installed and on the path Saturday, July 27, 13
  • 17. Building the App • cordova build - builds all of the platforms • cordova build android - builds only the android platform Saturday, July 27, 13
  • 18. Installing on a Device • cordova run android • Will install app to currently connected android device • Only Android is currently support • To install iOS you will need Xcode Saturday, July 27, 13
  • 20. Using Device Features • The “deviceready” event must be received before you can access device features • Most device features access through the navigator object • Over a dozen major APIs supported as of PhoneGap 3.0 Saturday, July 27, 13
  • 21. API What it does Accelerometer Captures device motion in the x, y, and z direction Camera The camera object provides access to the device's default camera application Compass Obtains the direction that the device is pointing Contacts The contacts object provides access to the device contacts database Geolocation The geolocation object provides access to location data based on the device's GPS sensor or inferred from network signals Saturday, July 27, 13
  • 23. Using JavaScript Libraries • PhoneGap is compatible with nearly all JavaScript libraries • If it works on the web it works • This includes, Sencha Touch, Backbone, jQuery and jQuery Mobile... Saturday, July 27, 13
  • 24. jQuery Mobile • PhoneGap lacks an innate UI • jQuery Mobile can supply • Must be sure that both libraries initialize Saturday, July 27, 13
  • 26. What is phoneGap Build? PhoneGap Build is a cloud-based service built on top of the PhoneGap framework. It allows you to easily build those same mobile apps in the cloud. Saturday, July 27, 13
  • 27. Why PhoneGap Build? • Don't need Device SDKs • Can Use Hydration Saturday, July 27, 13
  • 28. Using PhoneGap Build • Signup for an account • Can link to your GitHub account • Open Source projects are free • Private projects are charged, first one is free • Only git the www folder Saturday, July 27, 13
  • 29. Performance Tips • At times performance can be sluggish especially when combined with jQuery Mobile • Use event.preventDefault() • Cache jQuery Selectors • Minimize DOM interactions Saturday, July 27, 13
  • 30. Links • http://phonegap.com/ • https://build.phonegap.com • http://jquerymobile.com/ Saturday, July 27, 13
  • 31. Summary • PhoneGap is way to build mobile apps using web APIs • PhoneGap apps are cross platform by default • PhoneGap build lets you build in the cloud without installing lots of SDKs • PhoneGap apps can be performance challenged Saturday, July 27, 13