SlideShare une entreprise Scribd logo
1  sur  28
PhoneGap
A Developers Experience
Co-owner and Developer
at
Hello! I’m Tyler Johnston
@tylerjohnst @tylerjohnst
ahoyconsulting.com
What is PhoneGap?
PhoneGap is a framework for developing cross-platform
mobile applications using HTML, CSS, and Javascript. It is
based on the Apache Cordova project and is currently
maintained by Adobe.
Wait, I thought it was native?
applications. They are displayed using a full scree
Native App - apk/ipa/etc
Native APIs
Native WebView
Your Code
What Phone Features?
• Accelerometer
• Camera
• Capture
• Compass
• Connection
• Contacts
• File
• Geolocation
• Media
• Notification
• Storage
navigator.notification.vibrate(1000)
Wonderful APIs
Where Can My App Run?
• iOS (iPhone/iPad)
• Android
• Windows Phone 7
• Blackberry OS WebWorks 7
• Symbian WRT
• webOS
• Plugin interface for accessing native code
from the Javascript API.
• Very active community, developing some
really cool stuff.
• MapKit
• Flashlight
• Barcode scanner
• NFC
• Badges
• In App Purchases
Who is using this magical
framework?
The Right Tool
• PhoneGap is like any other tool, it should be
used for the right job.
• PhoneGap accelerates using data driven
applications.
• Not a great solution for apps that require
significant horsepower to run.
The Web Can Be Fast!
Don’t let the original Facebook app fool you. It
wasn’t HTML5 that made the app slow and
clunky. It was just a bad application.
Even though it is the web you have to think
about performance from the beginning.
Bring Your Own Tools
PhoneGap just gives you a web browser. Bring your own tools
page application. There are plenty of tools out ther
WHAT I’VE LEARNED
Performance
• Lazy load as much as you can.
• Defer rendering below the “fold.” (Load 10
of the 30 sub views, then the rest.)
• Precompile templates.
• Only fetch required collections needed for
the initial view.
• _.defer/setTimeout is your friend.
Prevent “Render Flash”
• Render off screen, animate in.
• Preload images. Each additional image is another
network request. View will render before the image
request even begins.
• Even fancier to build your own local cache.
• Manually disable the splash screen after your app has
initialized.
var path = ‘path/to/img.png’;
images = {};
images[path] = new Image;
images[path].src = path;
$(body).append(images[path]);
Performance
• Minify and concat all of your CSS/JS. Each
even though it’s a mobile app there are still
network requests that are fired to local disk
but with near zero latency.
• Use image sprites if you can, again, the less
asset requests the better the app will
function and seem more “native.”
Making Compilation Easier• Middleman (with the Middleman-Phonegap
plugin)
• Ruby on Rails-like asset pipeline. Supports
all the sprockets and rails plugins for almost
all templates. (Haml, Sass, Slim, Less) If it
works with Sprockets it works with
Middleman.
• Almost zero configuration. Only depends on
Ruby.
• Minify, concat, linting. All built in.
Track your references!
Memory leaks tend to be worse on mobile as it
will cause your entire app to force closed by
the OS once it uses enough resident memory.
FastClick.js
ms delay on the “click” event. FastClick.js is a polyfi
s the difference between a responsive app and a sl
hrome for Android has removed this. FastClick acco
Animations
• All mobile phones can optimize DOM elements to be animated
using the GPU. Using the GPU will cause the animations to be
silky smooth.
• To enable GPU acceleration on a DOM element append the
following CSS rules:
• GPU enabled DOM elements take significantly more memory.
The best solution being to only place it on elements which you
wish to perform animations on. Using the * selector will lead to
lots of pain and crashes.
transform: translate3d(0,0,0);
Styling
• Just because your app can be compiled and deployed
to multiple platforms it does not mean all of your user
interactions work across all platforms.
• iOS and Android have very different ways of displaying
UI.
• Action bars are usually opposite.
• Home buttons do different functions.
• Android and Windows have physical buttons.
• Loading different stylesheets at compile time is a very
easy solution to solving that problem.
Android 2.x Makes Me Cry
• Really, really, really old version of
Webkit.
• Nasty bugs.
• Really, really, really slow.
• Lack of most of CSS3 basic
features.
• Animations
• Gradients
• Shadows (Box and Text)
PhoneGap Build is Amazing
• Handles compilation of your
application to all available
platforms.
• Code signing for deployments
to App Stores
• Removes need for entire build
environment on the local
machine
• Remote debugging
• Hydration
• Test deployments
• Free for one app, $9.99 for up
to 25. Included if you have
Deploying to the App Store
• Once you have your binary you can begin
the process of submitting your app to the
respective app store.
• All signed binaries from PhoneGap build are
ready to upload.
The Google Play store is very straight
forward. Setup your account and upload
your signed APK and you are ready to
go. There is no approval process here.
By far the easiest store to deploy to.
• First release can take upwards of a month to get approved to the store
regardless of the framework used.
• Apple has some strict guidelines on how your app should function.
• Apps may not boot to a blank screen. So assets must be stored on
the device to make sure the app loads to an interactive state.
• Requiring external libraries on the initial load will cause you to fail the
audit.
• The code that does reside on the device must make it “interactive”
enough. Apple has a rule that all apps have to “contribute” to the
iPhone experience.
• But they will (hopefully) approve you. Using PhoneGap is not grounds
enough to reject an app. There are still a ton of reasons why they will
reject you. Be diligent!
Good luck and go make some awesome
stuff!
Questions? Comments?

Contenu connexe

Tendances

Snappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsSnappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsMatthew Beale
 
Shift Remote: JS - PoseDance: Build a TikTok Trainer - Jennifer Looper (Micro...
Shift Remote: JS - PoseDance: Build a TikTok Trainer - Jennifer Looper (Micro...Shift Remote: JS - PoseDance: Build a TikTok Trainer - Jennifer Looper (Micro...
Shift Remote: JS - PoseDance: Build a TikTok Trainer - Jennifer Looper (Micro...Shift Conference
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapTed Chien
 
PhoneGap - Now and the Future
PhoneGap - Now and the FuturePhoneGap - Now and the Future
PhoneGap - Now and the FutureTim Kim
 
Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Matheus Cardoso
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile DevelopmentShai Raiten
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Mark Leusink
 
Appium: Prime Cuts
Appium: Prime CutsAppium: Prime Cuts
Appium: Prime CutsSauce Labs
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for EngineersBrian LeRoux
 
Creating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic FrameworkCreating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic FrameworkJulien Renaux
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day trainingTroy Miles
 
Totally Build Apps for Free! (not really)
Totally Build Apps for Free! (not really)Totally Build Apps for Free! (not really)
Totally Build Apps for Free! (not really)Tony Hillerson
 
PSU Web 2014: UX and Design Tools That Will Improve Your Productivity
PSU Web 2014: UX and Design Tools That Will Improve Your ProductivityPSU Web 2014: UX and Design Tools That Will Improve Your Productivity
PSU Web 2014: UX and Design Tools That Will Improve Your ProductivityJennifer Aldrich
 
Building a mobile application for dot netnuke
Building a mobile application for dot netnukeBuilding a mobile application for dot netnuke
Building a mobile application for dot netnukebrchapman
 

Tendances (20)

Workshop Ionic Framework - CC FE & UX
Workshop Ionic Framework - CC FE & UXWorkshop Ionic Framework - CC FE & UX
Workshop Ionic Framework - CC FE & UX
 
Hybrid app development with ionic
Hybrid app development with ionicHybrid app development with ionic
Hybrid app development with ionic
 
Introduction to Mobile Development
Introduction to Mobile DevelopmentIntroduction to Mobile Development
Introduction to Mobile Development
 
Snappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsSnappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember Apps
 
Shift Remote: JS - PoseDance: Build a TikTok Trainer - Jennifer Looper (Micro...
Shift Remote: JS - PoseDance: Build a TikTok Trainer - Jennifer Looper (Micro...Shift Remote: JS - PoseDance: Build a TikTok Trainer - Jennifer Looper (Micro...
Shift Remote: JS - PoseDance: Build a TikTok Trainer - Jennifer Looper (Micro...
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
 
Webapi
WebapiWebapi
Webapi
 
PhoneGap - Now and the Future
PhoneGap - Now and the FuturePhoneGap - Now and the Future
PhoneGap - Now and the Future
 
Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile Development
 
Angular Connect
Angular ConnectAngular Connect
Angular Connect
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
Appium: Prime Cuts
Appium: Prime CutsAppium: Prime Cuts
Appium: Prime Cuts
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
 
Best Apps for a Business on the Go
Best Apps for a Business on the Go Best Apps for a Business on the Go
Best Apps for a Business on the Go
 
Creating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic FrameworkCreating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic Framework
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day training
 
Totally Build Apps for Free! (not really)
Totally Build Apps for Free! (not really)Totally Build Apps for Free! (not really)
Totally Build Apps for Free! (not really)
 
PSU Web 2014: UX and Design Tools That Will Improve Your Productivity
PSU Web 2014: UX and Design Tools That Will Improve Your ProductivityPSU Web 2014: UX and Design Tools That Will Improve Your Productivity
PSU Web 2014: UX and Design Tools That Will Improve Your Productivity
 
Building a mobile application for dot netnuke
Building a mobile application for dot netnukeBuilding a mobile application for dot netnuke
Building a mobile application for dot netnuke
 

Similaire à Phonegap - An Introduction

Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Nuxeo
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDee Sadler
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentÖzcan Zafer AYAN
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapAmar Mesic
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application developmentKunjan Thakkar
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building ProductsHayden Bleasel
 
2011 code camp
2011 code camp2011 code camp
2011 code campimranq2
 
Top 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App DevelopmentTop 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App Developmenttechugo
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Gil Irizarry
 
Development of a mobile app for Android
Development of a mobile app for AndroidDevelopment of a mobile app for Android
Development of a mobile app for AndroidAlexJReid
 
«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​FDConf
 
I knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile appsI knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile appsAlius Petraška
 
Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?Indiginox
 
appMobi HTML5 Gaming
appMobi HTML5 GamingappMobi HTML5 Gaming
appMobi HTML5 GamingAndrew Smith
 
Apache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application DevelopmentApache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application Developmentthedumbterminal
 

Similaire à Phonegap - An Introduction (20)

Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App Development
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGap
 
Future of Mobile
Future of MobileFuture of Mobile
Future of Mobile
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application development
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building Products
 
2011 code camp
2011 code camp2011 code camp
2011 code camp
 
Top 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App DevelopmentTop 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App Development
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Development of a mobile app for Android
Development of a mobile app for AndroidDevelopment of a mobile app for Android
Development of a mobile app for Android
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​
 
I knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile appsI knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile apps
 
Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?
 
appMobi HTML5 Gaming
appMobi HTML5 GamingappMobi HTML5 Gaming
appMobi HTML5 Gaming
 
Apache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application DevelopmentApache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application Development
 

Dernier

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 

Dernier (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 

Phonegap - An Introduction

  • 2. Co-owner and Developer at Hello! I’m Tyler Johnston @tylerjohnst @tylerjohnst ahoyconsulting.com
  • 3. What is PhoneGap? PhoneGap is a framework for developing cross-platform mobile applications using HTML, CSS, and Javascript. It is based on the Apache Cordova project and is currently maintained by Adobe.
  • 4. Wait, I thought it was native? applications. They are displayed using a full scree
  • 5. Native App - apk/ipa/etc Native APIs Native WebView Your Code
  • 6. What Phone Features? • Accelerometer • Camera • Capture • Compass • Connection • Contacts • File • Geolocation • Media • Notification • Storage navigator.notification.vibrate(1000) Wonderful APIs
  • 7. Where Can My App Run? • iOS (iPhone/iPad) • Android • Windows Phone 7 • Blackberry OS WebWorks 7 • Symbian WRT • webOS
  • 8. • Plugin interface for accessing native code from the Javascript API. • Very active community, developing some really cool stuff. • MapKit • Flashlight • Barcode scanner • NFC • Badges • In App Purchases
  • 9. Who is using this magical framework?
  • 10. The Right Tool • PhoneGap is like any other tool, it should be used for the right job. • PhoneGap accelerates using data driven applications. • Not a great solution for apps that require significant horsepower to run.
  • 11. The Web Can Be Fast! Don’t let the original Facebook app fool you. It wasn’t HTML5 that made the app slow and clunky. It was just a bad application. Even though it is the web you have to think about performance from the beginning.
  • 12. Bring Your Own Tools PhoneGap just gives you a web browser. Bring your own tools
  • 13. page application. There are plenty of tools out ther
  • 15. Performance • Lazy load as much as you can. • Defer rendering below the “fold.” (Load 10 of the 30 sub views, then the rest.) • Precompile templates. • Only fetch required collections needed for the initial view. • _.defer/setTimeout is your friend.
  • 16. Prevent “Render Flash” • Render off screen, animate in. • Preload images. Each additional image is another network request. View will render before the image request even begins. • Even fancier to build your own local cache. • Manually disable the splash screen after your app has initialized. var path = ‘path/to/img.png’; images = {}; images[path] = new Image; images[path].src = path; $(body).append(images[path]);
  • 17. Performance • Minify and concat all of your CSS/JS. Each even though it’s a mobile app there are still network requests that are fired to local disk but with near zero latency. • Use image sprites if you can, again, the less asset requests the better the app will function and seem more “native.”
  • 18. Making Compilation Easier• Middleman (with the Middleman-Phonegap plugin) • Ruby on Rails-like asset pipeline. Supports all the sprockets and rails plugins for almost all templates. (Haml, Sass, Slim, Less) If it works with Sprockets it works with Middleman. • Almost zero configuration. Only depends on Ruby. • Minify, concat, linting. All built in.
  • 19. Track your references! Memory leaks tend to be worse on mobile as it will cause your entire app to force closed by the OS once it uses enough resident memory.
  • 20. FastClick.js ms delay on the “click” event. FastClick.js is a polyfi s the difference between a responsive app and a sl hrome for Android has removed this. FastClick acco
  • 21. Animations • All mobile phones can optimize DOM elements to be animated using the GPU. Using the GPU will cause the animations to be silky smooth. • To enable GPU acceleration on a DOM element append the following CSS rules: • GPU enabled DOM elements take significantly more memory. The best solution being to only place it on elements which you wish to perform animations on. Using the * selector will lead to lots of pain and crashes. transform: translate3d(0,0,0);
  • 22. Styling • Just because your app can be compiled and deployed to multiple platforms it does not mean all of your user interactions work across all platforms. • iOS and Android have very different ways of displaying UI. • Action bars are usually opposite. • Home buttons do different functions. • Android and Windows have physical buttons. • Loading different stylesheets at compile time is a very easy solution to solving that problem.
  • 23. Android 2.x Makes Me Cry • Really, really, really old version of Webkit. • Nasty bugs. • Really, really, really slow. • Lack of most of CSS3 basic features. • Animations • Gradients • Shadows (Box and Text)
  • 24. PhoneGap Build is Amazing • Handles compilation of your application to all available platforms. • Code signing for deployments to App Stores • Removes need for entire build environment on the local machine • Remote debugging • Hydration • Test deployments • Free for one app, $9.99 for up to 25. Included if you have
  • 25. Deploying to the App Store • Once you have your binary you can begin the process of submitting your app to the respective app store. • All signed binaries from PhoneGap build are ready to upload.
  • 26. The Google Play store is very straight forward. Setup your account and upload your signed APK and you are ready to go. There is no approval process here. By far the easiest store to deploy to.
  • 27. • First release can take upwards of a month to get approved to the store regardless of the framework used. • Apple has some strict guidelines on how your app should function. • Apps may not boot to a blank screen. So assets must be stored on the device to make sure the app loads to an interactive state. • Requiring external libraries on the initial load will cause you to fail the audit. • The code that does reside on the device must make it “interactive” enough. Apple has a rule that all apps have to “contribute” to the iPhone experience. • But they will (hopefully) approve you. Using PhoneGap is not grounds enough to reject an app. There are still a ton of reasons why they will reject you. Be diligent!
  • 28. Good luck and go make some awesome stuff! Questions? Comments?