SlideShare a Scribd company logo
INTRODUCTION TO
CORDOVA
MAKING NATIVE-ONLY DEVS JEALOUS SINCE 2009
WHO AM I?
Developer Advocate for IBM
Focused on MobileFirst and Bluemix
Web Standards, HTML5, JavaScript,
Mobile, ColdFusion
www.raymondcamden.com
@raymondcamden
Introduction to Cordova
Introduction to Cordova
GENESIS (OF PHONEGAP)
Built at an iPhoneDevCamp in 2009
Started by Nitobi
Adobe bought Nitobi (2011)
Currently at 5.1.1
$$$?
PhoneGap is free
No, really, free
Open Source
APACHE CORDOVA
cordova.apache.org
PhoneGap is Adobe's implementation
PhoneGap == Cordova
LET'S GET TECHY
Creates "Hybrid" applications
Native wrapper around a web view
HTML (CSS,JS) handles layout
Cordova "bridges the gap" to native capabilities
ABOUT THAT GAP...
Cordova tries to follow standards
When it doesn't need to do anything, it doesn't
In the perfect world, Cordova won't exist
SUPPORTED PLATFORMS
iOS
Android
Windows Phone 8
BlackBerry 10
(docs.cordova.io)Super Long URL
OTHER PLATFORMS
Firefox OS
Amazon Fire OS
Ubuntu
Tizen
Windows 8
FEATURES (STUFF YOU CAN DO WITH
JAVASCRIPT!)
Accelerometer - when the device moves
Camera - pictures of your cat
Capture - audio, video, stills of your cat
Compass - for when you're lost in the woods
Connection - type of connection
FEATURES
Contacts - find and create new friends
Device - device and OS version metadata
Events - various app/hardware related events
File - native file system access (and upload/download)
Geolocation - for when you're lost in the woods
FEATURES
Globalization - date/number/currency formatting
Media - related to audio playback (supports record as well)
Notification - visual, audible, and tactile notifications
Splashscreen - for your splash screen needs
FEATURES
Plugin API for anything you can imagine...
UNOFFICIAL FEATURES
Use any of the 10 million JavaScript libraries
Use any of the 10 million APIs
Deploy to app store
NON-FEATURES
UI
UX
Native Killer
WHO IS USING CORDOVA?
REAL WORLD DEMO
Ray, click to the right if the demo worked.
Introduction to Cordova
Introduction to Cordova
Introduction to Cordova
Introduction to Cordova
Introduction to Cordova
HOW IS IT DONE?
Going from HTML to Binary
Making use of the "special" stuff
Thinking Differently
HOW IS IT DONE?
Install Node
Install cordova via npm: sudo npm install -g cordova (Windows
folks open your command prompt as an Admin)
Get SDK(s) (technically optional)
HOW IS IT DONE?
Command line init to create the project
Switch to your editor
Edit HTML, simulate, build (via CLI)
DEMO
I'll show creating a project and explain what the folders
represent.
ADDING PLATFORMS
cordova platforms add X (to add something)
cordova platforms (to report)
DEMO
I'm going to show adding iOS and Android as well as checking
what is there/installed.
BUILDING/EMULATING/TESTING
prepare
compile
build == prepare + compile
emulate
run
MY CYCLE
edit stuff
cordova emulate
DEMO
HOW DO WE DO THE AWESOME?
Include cordova.js (this will NOT exist in www)
Wait for "deviceready" event
plugins for each feature (so to do X, you add the plugin X)
config.xml (handles settings)
DEMO
I'm going to demo the camera API and totally screw it up.
PLUGINS
All core features use plugins
Additional features use plugins
Everything driven from CLI (list, add, and remove)
DEMO
Let's fix the camera demo.
DEMO
Let's show a few more: demos/contactpickerui,
demos/camera_vintagagejs, demos/mp3
REAL WORLD BUILDING
Desktop Browser
Mobile via Web
Ripple Emulator
Local SDK to Simulator/Device
DESKTOP BROWSER
Pro: Super Fast
Pro: No setup
Pro: Debugging Rocks
Con: UI isn't right
Con: UX isn't right
Con: Features missing
Con: Security restrictions
MOBILE VIA WEB
Pro: Kinda Fast
Pro: Minimal setup
Pro: UI and UX testing
Con: Features missing
Con: Security restrictions
Con: Debugging sucks
RIPPLE EMULATOR
Pro: Fast
Pro: Similar UI
Pro: Free
Pro: Security restrictions gone
Con: Not 100% supported
Con: Still not on the device
LOCAL SDK TO SIMULATOR/DEVICE
Pro: The Real Deal
Con: Slow(ish)
Con: Not Free
Con: Debugging *really* sucks
TO BE CLEAR: YOU MUST ALWAYS TEST ON A REAL DEVICE
WHAT RAY DOES (MOST OF THE TIME...)
Desktop
iOS Emulator
Genymotion for Android: http://www.genymotion.com
(Ray, show this)
TESTING
TESTING
On Desktop, just continue to use dev tools.
TESTING
On Mobile, just continue to use dev tools.
REMOTE DEBUG
Safari for iOS, Chrome for Android
"Full" dev tools for mobile web or Cordova
DEMO
GAPDEBUG
https://www.genuitec.com/products/gapdebug/
DEMO
SO WHAT ABOUT THAT WHOLE "THINK
DIFFERENT" THING?
USER INTERFACE
SUGGESTIONS
Libraries (like Bootstrap)
Responsive design and testing in general
USER EXPERIENCE
SUGGESTIONS
Libraries (again)
Testing on devices
Handling offline with client-side storage
ARCHITECTURE
SUGGESTIONS
Single Page Architecture
AngularJS, jQuery Mobile, etc
ALL IN ONE SOLUTION
IONICFRAMEWORK.COM
PHONEGAP BUILD
THE 411
Web based platform to do builds
Supports iOS, Android, Windows Phone, Blackberry, webOS,
Symbian
Has an API too
NO SDKS NO COMPILING NO MESS!
$$$
DEMO
PHONEGAP DEVELOPER
APP
Connects your desktop to your physical device (ios, android,
windows phone)
DEMO
WHAT TO GO NEXT?
Help - Google Group for PhoneGap
Developers - people.phonegap.com
cordova.apache.org
plugins.cordova.io
"APACHE CORDOVA IN ACTION"
manning.com/camden
THANK YOU!

More Related Content

PDF
10 Golden Rules For Outstanding Titanium Apps
PDF
Workshop Ionic Framework - CC FE & UX
PPTX
Developing for Xoom with Flash and AIR
PDF
Mobile Development with PhoneGap
PDF
Videogram - Building a product with Sencha Touch
PDF
Hybrid Mobile Development and MobileFirst
PDF
PhoneGap Talk @ Sencha Con 2010
KEY
Adobe and Modern Web Development
10 Golden Rules For Outstanding Titanium Apps
Workshop Ionic Framework - CC FE & UX
Developing for Xoom with Flash and AIR
Mobile Development with PhoneGap
Videogram - Building a product with Sencha Touch
Hybrid Mobile Development and MobileFirst
PhoneGap Talk @ Sencha Con 2010
Adobe and Modern Web Development

What's hot (19)

PDF
DEVIntersection 2014 iOS and Android Development for C# Developers
PDF
HTML5 Can't Do That
PPTX
WebDU Keynote
PPTX
Hybrid Mobile Development - Overview and Intro to Cordova/Ionic Framework
PPTX
What Have You Learnt About Technologies From The Process Of Constructing This...
PPTX
The Future of HTML5 Motion Design
PPTX
Evaluation question 4
PPTX
Phone gap
PPTX
Evaluation question 4
PPTX
Phonegap - An Overview
ODP
Introduction to PhoneGap
KEY
Skip the IDE with PhoneGap Build
PPTX
Building mobile apps using Phonegap
PDF
UX beers – Designing for TV – Sjoera Roggeman & Tine Lavrysen
PDF
Absolute Beginners Guide to iPhone dev
PPT
Building Hybrid Applications using PhoneGap
KEY
From mobile browser to mobile app
PPT
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
PDF
Introduction to PhoneGap
DEVIntersection 2014 iOS and Android Development for C# Developers
HTML5 Can't Do That
WebDU Keynote
Hybrid Mobile Development - Overview and Intro to Cordova/Ionic Framework
What Have You Learnt About Technologies From The Process Of Constructing This...
The Future of HTML5 Motion Design
Evaluation question 4
Phone gap
Evaluation question 4
Phonegap - An Overview
Introduction to PhoneGap
Skip the IDE with PhoneGap Build
Building mobile apps using Phonegap
UX beers – Designing for TV – Sjoera Roggeman & Tine Lavrysen
Absolute Beginners Guide to iPhone dev
Building Hybrid Applications using PhoneGap
From mobile browser to mobile app
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
Introduction to PhoneGap
Ad

Similar to Introduction to Cordova (20)

PDF
Cordova + Ionic + MobileFirst
PDF
[2015/2016] Apache Cordova
PDF
Apache Cordova
PPTX
Hybrid Mobile Development with Apache Cordova and
PDF
Cordova: APIs and instruments
PDF
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
PDF
Apache Cordova 4.x
PPTX
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
PPTX
Intro to PhoneGap
PDF
PhoneGap/Cordova
PPTX
Mobile Development with PhoneGap
PDF
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
PDF
Building Cross-Platform Mobile Apps
PPTX
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
PDF
Cordova 101
KEY
Intro to PhoneGap
PDF
PhoneGap mobile development
PDF
Maximiliano Firtman - Разработка приложений с помощью PhoneGap
PPTX
fdocuments.in_apache-cordova-overview.pptx
PPTX
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
Cordova + Ionic + MobileFirst
[2015/2016] Apache Cordova
Apache Cordova
Hybrid Mobile Development with Apache Cordova and
Cordova: APIs and instruments
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Apache Cordova 4.x
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Intro to PhoneGap
PhoneGap/Cordova
Mobile Development with PhoneGap
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Building Cross-Platform Mobile Apps
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
Cordova 101
Intro to PhoneGap
PhoneGap mobile development
Maximiliano Firtman - Разработка приложений с помощью PhoneGap
fdocuments.in_apache-cordova-overview.pptx
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
Ad

More from Raymond Camden (9)

PPTX
Building a PWA - For Everyone Who Is Scared To
PPTX
Going Serverless with OpenWhisk
PPTX
Don't Over-React - just use Vue!
PDF
Rapid API Development with LoopBack/StrongLoop
PDF
Static Sites - Bringing Web 1.0 Back
PDF
Leveling Up at JavaScript
PDF
The Other Dev Tools
PDF
Introduction to PhoneGap
PDF
ColdFusion 10
Building a PWA - For Everyone Who Is Scared To
Going Serverless with OpenWhisk
Don't Over-React - just use Vue!
Rapid API Development with LoopBack/StrongLoop
Static Sites - Bringing Web 1.0 Back
Leveling Up at JavaScript
The Other Dev Tools
Introduction to PhoneGap
ColdFusion 10

Recently uploaded (20)

PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
Internet___Basics___Styled_ presentation
PPTX
Funds Management Learning Material for Beg
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
DOCX
Unit-3 cyber security network security of internet system
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPTX
artificial intelligence overview of it and more
PDF
Testing WebRTC applications at scale.pdf
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PptxGenJS_Demo_Chart_20250317130215833.pptx
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
introduction about ICD -10 & ICD-11 ppt.pptx
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
SASE Traffic Flow - ZTNA Connector-1.pdf
Internet___Basics___Styled_ presentation
Funds Management Learning Material for Beg
Module 1 - Cyber Law and Ethics 101.pptx
Design_with_Watersergyerge45hrbgre4top (1).ppt
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
RPKI Status Update, presented by Makito Lay at IDNOG 10
Unit-3 cyber security network security of internet system
Unit-1 introduction to cyber security discuss about how to secure a system
Slides PDF The World Game (s) Eco Economic Epochs.pdf
Job_Card_System_Styled_lorem_ipsum_.pptx
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
artificial intelligence overview of it and more
Testing WebRTC applications at scale.pdf
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...

Introduction to Cordova