SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
Emerging Internet Technologies




Building Native Mobile Applications with
PhoneGap


         Becky Gibson
         Simon MacDonald



                                           © 2011 IBM Corporation
Emerging Internet Technologies




Agenda

      Mobile Application Overview
      What is PhoneGap?
      PhoneGap Architecture
      Extending PhoneGap
      Building an App
      Summary




2         Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Mobile Space




                                              http://www.abmuku.com/2011/02/24/technology/american-cell-phone-usage-infographic/


3       Building Native Mobile Applications with PhoneGap                                                 © 2011 IBM Corporation
Emerging Internet Technologies




Everyone Wants a Piece of that Pie!




4        Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Mobile Web Apps

       Fast, easy, simple
       Run in mobile browsers
       Built on W3C technologies
       Minimal access to device features




5        Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Mobile Applications

       Platform Specific
       Sold via App Stores
       Specific technologies and
        development environments
       Licensing agreements




6        Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Hybrid Applications

        Built with Web Technologies
        Access to Device Features
        Distributed via App Stores
        Some platform specific knowledge
        Licensing Agreements




7        Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Mobile App Comparison
                                         Web                         Hybrid            Native

    Dev cost                             Reasonable                  Reasonable        Expensive


    Dev time                             Short                       Short             Long


    App portability                      High                        High              None

                                                                     Native speed if
    Performance                          Fast
                                                                     needed
                                                                                       Very Fast

    Native
                                         No                          All               All
    functionality
    App store
                                         No                          Yes               Yes
    distribution

    Extensible                           No                          Yes               Yes

8                Building Native Mobile Applications with PhoneGap                                 © 2011 IBM Corporation
Emerging Internet Technologies




What’s a Developer to Do?




9       Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




What is PhoneGap?

     It’s a tool for building mobile apps using Web technologies




             HTML For Layout
             JavaScript to access device functionality
                    navigator.notification.vibrate()
             CSS for rich look and feel
             Standards Based
10            Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




How Does PhoneGap Work?




11     Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




PhoneGap Community

       Started by Nitobi in 2008
       Large, active open-source community
       350,000 downloads, 175,000 visits/month, 5000+ forum
        members
       Open Source – http://github.com/phonegap
            – Apache2 inbound (CLA)
            – MIT & BSD outbound
       Companies participating: IBM, RIM, Microsoft
       1.0 Release July, 2011




12       Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




PhoneGap Apps

     How many are there?

     You can’t tell!
        (unless you are told)



http://www.phonegap.com/apps




13             Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




PhoneGap Features
                                                 Core APIs
     –  Media (audio play/record)                              –    Accelerometer
     –  Media Capture: audio, video,                           –    Compass
        camera – (W3C)                                         –    Camera
     –  Network (W3C)                                          –    Contacts (W3C)
     –  Notification                                           –    File (W3C)
     –  Storage (HTML5 Web SQL &                               –    File Transfer
        Web Storage)
                                                               –    Geolocation (HTML5)




14         Building Native Mobile Applications with PhoneGap                          © 2011 IBM Corporation
Emerging Internet Technologies




Typical Architecture

        HTML/JS/CSS + graphic assets are on the device,
         packaged as part of the build process.
        JavaScript can store retrieved data in a SQLite
         database or from localStorage (key/value pair) for
         offline access.
        Often a server component involved.
        JavaScript communicates with the server via XHR to
         get retrieve data.
        Yes, you can load your app remotely with caveats.




15       Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies



     PhoneGap Architecture Diagram
                                                                   PhoneGap
                                                                   Application
         Web App                                                                        PhoneGap Plug-ins
          HTML                   JavaScript                                              Accelerometer       Geolocation
          CSS                    Resources                                               Camera              Media
                                                                                         Compass             Network
                                      PhoneGap




                                                                                         Contacts            Notification
                                                 JS APIs
                 HTML
                 APIs




                                                                                         File                Storage

         HTML Rendering Engine                                                           Custom Plug-ins
                                                                      PhoneGap
         (WebView)                                                    Native APIs
                            OS APIs




                                                                                                            OS APIs
                                                           Services                 Sensors
       Mobile OS
                                                           Input                    Graphics


16              Building Native Mobile Applications with PhoneGap                                                      © 2011 IBM Corporation
Emerging Internet Technologies




Writing for Multiple Devices

        Use a JavaScript Toolkit!
          Most support at least Android and iOS
              Remember that size matters!




                                             Sencha Touch




            Mobile Dojo


17       Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Best Practices
       Where possible use single HTML page
              Use JavaScript to show/hide page elements based on
               user interaction instead of linking to a separate page.
              Those JavaScript toolkits come in handy here!
       Obfuscate / crunch your JavaScript before release
       Consider offline usage
               navigator.network.connection.type
               online /offline events
               Note: Apple checks for offline support
       Utilize persistent storage
               File APIs
               Storage APIs
               SQL Lite / Lawnchair


18       Building Native Mobile Applications with PhoneGap      © 2011 IBM Corporation
Emerging Internet Technologies




Using PhoneGap


     1.  Create resources in www directory
     2.  Include phonegap.*.js in your start page (usually
         index.html)
     3.  Create onload handler
     4.  In onload handler register for deviceReady event
         from PhoneGap
     5.  When deviceready fires PhoneGap is ready.
     6.  Build, install and test for each platform




19      Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Building a PhoneGap App




                                          DEMO




20      Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Debugging?



                         Console.log is your friend!



       Wednesday @ 4:10pm – Portland 252
       Debugging Mobile Web Applications with
       weinre
       Patrick Mueller (IBM)



21     Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Extending PhoneGap
       Provide native code and JavaScript API
       – Extend Existing Features
       – Support for new sensors (NFC, ...)
       Examples of current plug-ins
       – http://github.com/phonegap/phonegap-plugins
       – Barcode scanner (Android, iOS)
       – Clipboard manager (Android, iOS)
       – Child browser (Android, iOS)
       – Contact viewer (Android)
       – iAd (iOS)
       – PayPal (iOS)

22       Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Future
       Additional Features
             Plugin Only Architecture
             W3C APIs
                 Web Notifications
                 Calendar
                 Messaging
             Crypto / security
             Menus
             More at
              http://wiki.phonegap.com/w/page/28291160/
              roadmap-planning
       We want YOU to contribute code!
             Bug fixes
             Plugins

23        Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Other PhoneGap folks presenting @ OSCON

       Wednesday @ 5:00pm - Portland 252
       Android WebKit Development - A
       Cautionary Tale
       Joe Bowser (Nitobi)

        Thursday @2:30pm – Portland Ballroom
        HTML5 and Mobile: Getting from Good
        Enough to Great
        Filip Maj (Nitobi)



24      Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation
Emerging Internet Technologies




Resources
       More Info
        –  http://www.phonegap.com/
       Getting Started
        – http://www.phonegap.com/start
       Mailing List / Google Group
        – http://groups.google.com/group/phonegap
       API Documentation
        – http://docs.phonegap.com/
       Wiki
        – http://wiki.phonegap.com/w/page/16494772/FrontPage
       CODE
        – http://github.com/phonegap

25       Building Native Mobile Applications with PhoneGap   © 2011 IBM Corporation

Contenu connexe

Tendances

Hybrid App Development with PhoneGap
Hybrid App Development with PhoneGapHybrid App Development with PhoneGap
Hybrid App Development with PhoneGapDotitude
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapdegarden
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGapJoseph Labrecque
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010alunny
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapQuang Minh Dao
 
Mobile Drupal
Mobile DrupalMobile Drupal
Mobile DrupalTwinbit
 
From mobile browser to mobile app
From mobile browser to mobile appFrom mobile browser to mobile app
From mobile browser to mobile appRyan Stewart
 
PhoneGap: a brief history and apologia
PhoneGap: a brief history and apologiaPhoneGap: a brief history and apologia
PhoneGap: a brief history and apologialorinbeer
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapNick Landry
 
Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012Ryan Stewart
 
Debugging and deploying with phone gap
Debugging and deploying with phone gapDebugging and deploying with phone gap
Debugging and deploying with phone gapRyan Stewart
 
Phone gap in android technology
Phone gap in android technologyPhone gap in android technology
Phone gap in android technologyVikrant Thakare
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap InsightsMonaca
 
Hybrid Mobile Applications
Hybrid Mobile ApplicationsHybrid Mobile Applications
Hybrid Mobile ApplicationsRuwan Ranganath
 
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSSCordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSSGabriel Huecas
 
HTML5를 활용한 하이브리드 앱개발하기
HTML5를 활용한 하이브리드 앱개발하기HTML5를 활용한 하이브리드 앱개발하기
HTML5를 활용한 하이브리드 앱개발하기정현 황
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstRaymond Camden
 

Tendances (20)

Hybrid App Development with PhoneGap
Hybrid App Development with PhoneGapHybrid App Development with PhoneGap
Hybrid App Development with PhoneGap
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Phone gap
Phone gapPhone gap
Phone gap
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Mobile Drupal
Mobile DrupalMobile Drupal
Mobile Drupal
 
From mobile browser to mobile app
From mobile browser to mobile appFrom mobile browser to mobile app
From mobile browser to mobile app
 
PhoneGap: a brief history and apologia
PhoneGap: a brief history and apologiaPhoneGap: a brief history and apologia
PhoneGap: a brief history and apologia
 
Phonegap - An Overview
Phonegap - An OverviewPhonegap - An Overview
Phonegap - An Overview
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
 
Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012
 
Debugging and deploying with phone gap
Debugging and deploying with phone gapDebugging and deploying with phone gap
Debugging and deploying with phone gap
 
Phone gap in android technology
Phone gap in android technologyPhone gap in android technology
Phone gap in android technology
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap Insights
 
Hybrid Mobile Applications
Hybrid Mobile ApplicationsHybrid Mobile Applications
Hybrid Mobile Applications
 
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSSCordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
 
Hybrid mobile apps
Hybrid mobile appsHybrid mobile apps
Hybrid mobile apps
 
HTML5를 활용한 하이브리드 앱개발하기
HTML5를 활용한 하이브리드 앱개발하기HTML5를 활용한 하이브리드 앱개발하기
HTML5를 활용한 하이브리드 앱개발하기
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 

Similaire à Building Native Mobile Applications with PhoneGap

Developing Downloadable Mobile Apps Using HTML5 and PhoneGap
Developing Downloadable Mobile Apps Using HTML5 and PhoneGapDeveloping Downloadable Mobile Apps Using HTML5 and PhoneGap
Developing Downloadable Mobile Apps Using HTML5 and PhoneGapWorklight
 
HTML5 for Mobile - When and Why
HTML5 for Mobile - When and WhyHTML5 for Mobile - When and Why
HTML5 for Mobile - When and WhyDMI
 
Drupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_printDrupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_printDrupalcampAtlanta2012
 
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe CampPhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe CampMihai Corlan
 
Midweek breather hybridapps
Midweek breather hybridappsMidweek breather hybridapps
Midweek breather hybridappsstrider1981
 
Integrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterIntegrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterBrian Huff
 
Simplifying Enterprise Mobility - Powering Mobile Apps from The Cloud
Simplifying Enterprise Mobility - Powering Mobile Apps from The CloudSimplifying Enterprise Mobility - Powering Mobile Apps from The Cloud
Simplifying Enterprise Mobility - Powering Mobile Apps from The CloudJoe Drumgoole
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsJames Pearce
 
Mobile Endgeräte sind überall – deshalb das mobile Portal
Mobile Endgeräte sind überall – deshalb das mobile Portal Mobile Endgeräte sind überall – deshalb das mobile Portal
Mobile Endgeräte sind überall – deshalb das mobile Portal IBM Lotus
 
DevOps for Mobile - DevOpsDays, NY, 2013
DevOps for Mobile - DevOpsDays, NY, 2013DevOps for Mobile - DevOpsDays, NY, 2013
DevOps for Mobile - DevOpsDays, NY, 2013Sanjeev Sharma
 
How to scale enterprise mobility and improve roi
How to scale enterprise mobility and improve roiHow to scale enterprise mobility and improve roi
How to scale enterprise mobility and improve roiApperian
 
Cross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCA API Management
 
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and Mustache
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and MustacheRoad to mobile w/ Sinatra, jQuery Mobile, Spine.js and Mustache
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and MustacheBrian Sam-Bodden
 
Mobile porting and testing - Xoriant
Mobile porting and testing - Xoriant Mobile porting and testing - Xoriant
Mobile porting and testing - Xoriant Xoriant Corporation
 
Developing cross platform mobile applications with phone gap for windows phone
Developing cross platform mobile applications with phone gap for windows phoneDeveloping cross platform mobile applications with phone gap for windows phone
Developing cross platform mobile applications with phone gap for windows phoneColin Eberhardt
 
IBM MobileFirst Technical Overview
IBM MobileFirst Technical OverviewIBM MobileFirst Technical Overview
IBM MobileFirst Technical Overviewibmmobile
 

Similaire à Building Native Mobile Applications with PhoneGap (20)

Developing Downloadable Mobile Apps Using HTML5 and PhoneGap
Developing Downloadable Mobile Apps Using HTML5 and PhoneGapDeveloping Downloadable Mobile Apps Using HTML5 and PhoneGap
Developing Downloadable Mobile Apps Using HTML5 and PhoneGap
 
HTML5 for Mobile - When and Why
HTML5 for Mobile - When and WhyHTML5 for Mobile - When and Why
HTML5 for Mobile - When and Why
 
Drupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_printDrupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_print
 
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe CampPhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
 
Midweek breather hybridapps
Midweek breather hybridappsMidweek breather hybridapps
Midweek breather hybridapps
 
Integrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterIntegrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenter
 
Simplifying Enterprise Mobility - Powering Mobile Apps from The Cloud
Simplifying Enterprise Mobility - Powering Mobile Apps from The CloudSimplifying Enterprise Mobility - Powering Mobile Apps from The Cloud
Simplifying Enterprise Mobility - Powering Mobile Apps from The Cloud
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
 
Salesforce touch
Salesforce touchSalesforce touch
Salesforce touch
 
Magic xpa total mobility experience
Magic xpa  total mobility experienceMagic xpa  total mobility experience
Magic xpa total mobility experience
 
Mobile Endgeräte sind überall – deshalb das mobile Portal
Mobile Endgeräte sind überall – deshalb das mobile Portal Mobile Endgeräte sind überall – deshalb das mobile Portal
Mobile Endgeräte sind überall – deshalb das mobile Portal
 
DevOps for Mobile - DevOpsDays, NY, 2013
DevOps for Mobile - DevOpsDays, NY, 2013DevOps for Mobile - DevOpsDays, NY, 2013
DevOps for Mobile - DevOpsDays, NY, 2013
 
How to scale enterprise mobility and improve roi
How to scale enterprise mobility and improve roiHow to scale enterprise mobility and improve roi
How to scale enterprise mobility and improve roi
 
Cross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San Francisco
 
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and Mustache
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and MustacheRoad to mobile w/ Sinatra, jQuery Mobile, Spine.js and Mustache
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and Mustache
 
Mobile porting and testing - Xoriant
Mobile porting and testing - Xoriant Mobile porting and testing - Xoriant
Mobile porting and testing - Xoriant
 
Developing cross platform mobile applications with phone gap for windows phone
Developing cross platform mobile applications with phone gap for windows phoneDeveloping cross platform mobile applications with phone gap for windows phone
Developing cross platform mobile applications with phone gap for windows phone
 
Hybrid Apps / iPhoneDevCon 2010
Hybrid Apps / iPhoneDevCon 2010Hybrid Apps / iPhoneDevCon 2010
Hybrid Apps / iPhoneDevCon 2010
 
IBM MobileFirst Technical Overview
IBM MobileFirst Technical OverviewIBM MobileFirst Technical Overview
IBM MobileFirst Technical Overview
 
Mobile Apps Develpment - A Comparison
Mobile Apps Develpment - A ComparisonMobile Apps Develpment - A Comparison
Mobile Apps Develpment - A Comparison
 

Dernier

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Dernier (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Building Native Mobile Applications with PhoneGap

  • 1. Emerging Internet Technologies Building Native Mobile Applications with PhoneGap Becky Gibson Simon MacDonald © 2011 IBM Corporation
  • 2. Emerging Internet Technologies Agenda   Mobile Application Overview   What is PhoneGap?   PhoneGap Architecture   Extending PhoneGap   Building an App   Summary 2 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 3. Emerging Internet Technologies Mobile Space http://www.abmuku.com/2011/02/24/technology/american-cell-phone-usage-infographic/ 3 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 4. Emerging Internet Technologies Everyone Wants a Piece of that Pie! 4 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 5. Emerging Internet Technologies Mobile Web Apps   Fast, easy, simple   Run in mobile browsers   Built on W3C technologies   Minimal access to device features 5 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 6. Emerging Internet Technologies Mobile Applications   Platform Specific   Sold via App Stores   Specific technologies and development environments   Licensing agreements 6 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 7. Emerging Internet Technologies Hybrid Applications   Built with Web Technologies   Access to Device Features   Distributed via App Stores   Some platform specific knowledge   Licensing Agreements 7 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 8. Emerging Internet Technologies Mobile App Comparison Web Hybrid Native Dev cost Reasonable Reasonable Expensive Dev time Short Short Long App portability High High None Native speed if Performance Fast needed Very Fast Native No All All functionality App store No Yes Yes distribution Extensible No Yes Yes 8 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 9. Emerging Internet Technologies What’s a Developer to Do? 9 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 10. Emerging Internet Technologies What is PhoneGap? It’s a tool for building mobile apps using Web technologies HTML For Layout JavaScript to access device functionality navigator.notification.vibrate() CSS for rich look and feel Standards Based 10 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 11. Emerging Internet Technologies How Does PhoneGap Work? 11 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 12. Emerging Internet Technologies PhoneGap Community   Started by Nitobi in 2008   Large, active open-source community   350,000 downloads, 175,000 visits/month, 5000+ forum members   Open Source – http://github.com/phonegap – Apache2 inbound (CLA) – MIT & BSD outbound   Companies participating: IBM, RIM, Microsoft   1.0 Release July, 2011 12 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 13. Emerging Internet Technologies PhoneGap Apps How many are there? You can’t tell! (unless you are told) http://www.phonegap.com/apps 13 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 14. Emerging Internet Technologies PhoneGap Features Core APIs –  Media (audio play/record) –  Accelerometer –  Media Capture: audio, video, –  Compass camera – (W3C) –  Camera –  Network (W3C) –  Contacts (W3C) –  Notification –  File (W3C) –  Storage (HTML5 Web SQL & –  File Transfer Web Storage) –  Geolocation (HTML5) 14 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 15. Emerging Internet Technologies Typical Architecture   HTML/JS/CSS + graphic assets are on the device, packaged as part of the build process.   JavaScript can store retrieved data in a SQLite database or from localStorage (key/value pair) for offline access.   Often a server component involved.   JavaScript communicates with the server via XHR to get retrieve data.   Yes, you can load your app remotely with caveats. 15 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 16. Emerging Internet Technologies PhoneGap Architecture Diagram PhoneGap Application Web App PhoneGap Plug-ins HTML JavaScript Accelerometer Geolocation CSS Resources Camera Media Compass Network PhoneGap Contacts Notification JS APIs HTML APIs File Storage HTML Rendering Engine Custom Plug-ins PhoneGap (WebView) Native APIs OS APIs OS APIs Services Sensors Mobile OS Input Graphics 16 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 17. Emerging Internet Technologies Writing for Multiple Devices Use a JavaScript Toolkit! Most support at least Android and iOS Remember that size matters! Sencha Touch Mobile Dojo 17 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 18. Emerging Internet Technologies Best Practices   Where possible use single HTML page   Use JavaScript to show/hide page elements based on user interaction instead of linking to a separate page.   Those JavaScript toolkits come in handy here!   Obfuscate / crunch your JavaScript before release   Consider offline usage   navigator.network.connection.type   online /offline events   Note: Apple checks for offline support   Utilize persistent storage   File APIs   Storage APIs   SQL Lite / Lawnchair 18 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 19. Emerging Internet Technologies Using PhoneGap 1.  Create resources in www directory 2.  Include phonegap.*.js in your start page (usually index.html) 3.  Create onload handler 4.  In onload handler register for deviceReady event from PhoneGap 5.  When deviceready fires PhoneGap is ready. 6.  Build, install and test for each platform 19 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 20. Emerging Internet Technologies Building a PhoneGap App DEMO 20 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 21. Emerging Internet Technologies Debugging? Console.log is your friend! Wednesday @ 4:10pm – Portland 252 Debugging Mobile Web Applications with weinre Patrick Mueller (IBM) 21 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 22. Emerging Internet Technologies Extending PhoneGap   Provide native code and JavaScript API – Extend Existing Features – Support for new sensors (NFC, ...)   Examples of current plug-ins – http://github.com/phonegap/phonegap-plugins – Barcode scanner (Android, iOS) – Clipboard manager (Android, iOS) – Child browser (Android, iOS) – Contact viewer (Android) – iAd (iOS) – PayPal (iOS) 22 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 23. Emerging Internet Technologies Future   Additional Features   Plugin Only Architecture   W3C APIs   Web Notifications   Calendar   Messaging   Crypto / security   Menus   More at http://wiki.phonegap.com/w/page/28291160/ roadmap-planning   We want YOU to contribute code!   Bug fixes   Plugins 23 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 24. Emerging Internet Technologies Other PhoneGap folks presenting @ OSCON Wednesday @ 5:00pm - Portland 252 Android WebKit Development - A Cautionary Tale Joe Bowser (Nitobi) Thursday @2:30pm – Portland Ballroom HTML5 and Mobile: Getting from Good Enough to Great Filip Maj (Nitobi) 24 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation
  • 25. Emerging Internet Technologies Resources   More Info –  http://www.phonegap.com/   Getting Started – http://www.phonegap.com/start   Mailing List / Google Group – http://groups.google.com/group/phonegap   API Documentation – http://docs.phonegap.com/   Wiki – http://wiki.phonegap.com/w/page/16494772/FrontPage   CODE – http://github.com/phonegap 25 Building Native Mobile Applications with PhoneGap © 2011 IBM Corporation