SlideShare une entreprise Scribd logo
1  sur  24
Creating Android Apps w/PhoneGap

           with Dean Peters
             http://linkd.in/deandroid




           TriDroid@SAS Meetup
           7:00pm, Thursday, May 17, 2012
           SAS Building S, Room 1051
           600 SAS Campus Drive,
           Cary, NC, Raleigh, NC
           http://bit.ly/TriDroid17May12




05/17/12      Creating Android Apps w/Phone Gap   slide 1
                         with Dean Peters
Introduction

  Who is this Dean Peters guy?

   Support Development Team Lead at
     McClatchy Interactive;
                           Creating Android Apps w/Phone Gap

   Manages a team of front-end developers ...
                             with Dean Peters



   Works in the field on arena of online newspapers
    such as the Miami Herald, Charlotte Observer & the N&O.
   Is currently working on designing and developing mobile
      landing pages.
   Is a web API junkie (but really, I can quit whenever I want to).

05/17/12                   Creating Android Apps w/Phone Gap          slide 2
                                     with Dean Peters
Agenda

                         Presentation Facts
      Service Size 1 presentation (1hr)
      Servings Per Container about 45

      Introductions                                    1pg         5%
      Topical Overview                                 1pg         5%
      Technology Stack                                 1pg
                               Creating Android Apps w/Phone Gap   5%
      PhoneGap 101                                     2pg
                                         with Dean Peters          5%
      Applaud & Mulberry                               1pg         5%

      jQuery Mobile & Sencha Touch                       2pg        5%
      jQuick Demo                                        1pg        5%
      Code & Compile Walk-Throughs                       3pg       15%
      Latency in the Mobile Domain                       3pg       20%
      AJAX, YQL, CORS & Responsive Design                5pg       20%
      Cloud-Based Build Options                          1pg        5%
      Q&A                                                1pg        5%


05/17/12                       Creating Android Apps w/Phone Gap         slide 3
                                          with Dean Peters
Feel free to interact at any time ...




                                              Was it something I said?


05/17/12             Creating Android Apps w/Phone Gap                   slide 4
                               with Dean Peters
Tonight's Technology Stack
                             App
                           CSS3
                   jQuery Mobile
                          jQuery
                         HTML5
               PhoneGap / Cordova
                 Applaud Plugin
                         Eclipse
05/17/12        Creating Android Apps w/Phone Gap   slide 5
                          with Dean Peters
PhoneGap, a short & painless history

 An Open Source mobile
  framework produced by Nitobi;
 1st developed at iPhoneDevCamp
  San Francisco;
 Won the 2009 Web 2.0 People's
  Choice Award
 Donated to the Apache Foundation
  in September of 2011;
05/17/12        Creating Android Apps w/Phone Gap
                          with Dean Peters
                                                    slide 6
PhoneGap 101

 It is a distribution of Apache
   Cordova ...
 to develop native mobile apps
   leveraging HTML5, CSS3 &
   JavaScript;
 field apps for iPhone, Android,
   Blackberry, WebOS, Symbian &
   WindowsPhone 7;
05/17/12       Creating Android Apps w/Phone Gap   slide 7
                         with Dean Peters
How Do I Get Started?

 Phone Gap out-of-the-box is not really out-of-the-
  box
 Fortunately there are tools to help jump start your
  project




05/17/12         Creating Android Apps w/Phone Gap   slide 8
                           with Dean Peters
AppLaud & Mulberry

 Two tools designed to
  to jump-start your
  PhoneGap development.


 Mulberry provides a 'Ruby-flavored' toolkit:
    http://mulberry.toura.com/
 AppLaud provides an Eclipse Plugin:
    http://www.mobiledevelopersolutions.com/

05/17/12             Creating Android Apps w/Phone Gap   slide 9
                               with Dean Peters
How Do I Get Started w/Coding?

 You don't have to hand-code everything from
  scratch;
 There are frameworks and libraries to help you
  get started.




05/17/12           Creating Android Apps w/Phone Gap   slide 10
                             with Dean Peters
jQuery Mobile & Sencha Touch

 Both provide JavaScript
  frameworks for mobile development


 Sencha Touch is built using Ext JS and offers 3
  licensing models: http://sencha.com

 jQuery Mobile is built on jQuery and is Open
   Source: jquerymobile.com

05/17/12          Creating Android Apps w/Phone Gap   slide 11
                            with Dean Peters
Code & Compile Walk-Through 1

 60 seconds to
  Hello TriDroid




05/17/12           Creating Android Apps w/Phone Gap   slide 12
                             with Dean Peters
a PhoneGap App Demo

 What's Behind the Curtain
      Android SDK
           http://developer.android.com/sdk/index.html
      Eclipse Classic or IDE for Java
           http://www.eclipse.org/downloads/packages/release/helios/sr2
      PhoneGap
           http://wiki.phonegap.com/w/page/30862722/phonegap-android-eclipse-quick
      Applaud plugin for Eclipse
           http://www.mobiledevelopersolutions.com/home/start
      ADT plugin for Eclipse
05/17/12                   Creating Android Apps w/Phone Gap        slide 13
                                     with Dean Peters
Code & Compile Walk-Through 2

The TriDroid News Reader
    (a truly aggregating app)
A baseline app all TriDroid@sas
  members to download & enjoy
Includes jQuery
Uses jquery.address.js
  a history management plugin
Imports Foundation,
  a CSS3 framework for
  responsive web design
Leverages YQL to provide CORS–ready jSON
05/17/12                Creating Android Apps w/Phone Gap   slide 14
                                  with Dean Peters
What type of issues will I encounter?

 Three issues of you're likely to run into when
  writing an RSS reader are:
 Cross-Domain restrictions
  built into JavaScript's
  XMLHttpRequest.
 Latency in the data delivery.
 Latency in the rendering of the data.



05/17/12         Creating Android Apps w/Phone Gap   slide 15
                           with Dean Peters
CORS
CORS == Cross-Origin Resource Sharing
Below is an example that would support requests
 from both REST and SOAP from domains1.com
 and domain-two.com.
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "domain1.com"
Header set Access-Control-Allow-Methods "GET,PUT,POST,OPTIONS"
Header set Access-Control-Allow-Headers "Content-Type"
Header set Access-Control-Allow-Credentials "true"
Header set Access-Control-Accept-Encoding "gzip,deflate"
Header set Access-Control-Allow-Headers: "X-File-Name,X-File-
  Type,X-File-Size"
Header append Access-Control-Allow-Origin "domain-two.com"
Header append Access-Control-Allow-Headers "Origin"
Header append Access-Control-Allow-Headers "Accept"
Header append Access-Control-Allow-Headers "X-Requested-With"
05/17/12              Creating Android Apps w/Phone Gap    slide 16
                                with Dean Peters
Latency in the Mobile Domain




           Source: http://www.gomez.com/thank-you/what-users-want-from-mobile-infographic/


05/17/12                     Creating Android Apps w/Phone Gap                      slide 17
                                       with Dean Peters
Latency in the Mobile Domain




Source: http://dylan.tweney.com/2012/02/21/startups-struggle-to-keep-their-sites-speedy-on-pcs-phones-and-tablets/



  05/17/12                             Creating Android Apps w/Phone Gap                             slide 18
                                                   with Dean Peters
Latency in the Mobile Domain
            The Same App Across Different Networks == Different User Experiences




Source: http://www.slideshare.net/Gomez_Inc/the-state-of-the-mobile-market-what-endusers-want-from-mobile


 05/17/12                             Creating Android Apps w/Phone Gap                          slide 19
                                                 with Dean Peters
Latency in the Mobile Domain

 The 'A' in AJAX is for Asynchronous
 Avoid JavaScript when responsive
  HTML5 & CSS3 will do.
 Do less with the DOM
 Consider farming out
  heavy rendering to web services.
 Consider porting heavy JavaScript from the app
  to a service platform such as Node.js

05/17/12         Creating Android Apps w/Phone Gap   slide 20
                           with Dean Peters
The A in AJAX for Asynchronous
Use CORS or proxies rather than jSON-p
Use frameworks such as jQuery that allow you to
 defer, cache and queue actions, such as:
            function getData( val ){
                // return either the cached value or an
                // jqXHR object (which contains a promise)
                return window.caches.cache[ val ]|| $.ajax('/mywebservice/', {
                    data: { value: val },
                    dataType: 'json',
                    success: function( resp ){
                        // create a cache in the windows object
                        window.caches.cache[ val ] = resp;
                    }
                });
            }
            // this wraps the 'getData()' ajax call
            $.when(getData('foo')).then(function(resp){
                // do something with the response, which may
                // or may not have been retrieved using an
                // XHR request.
            });
05/17/12                  Creating Android Apps w/Phone Gap             slide 21
                                    with Dean Peters
Responsive Design

While you can use JavaScript to deal with different
devices ...
... the preferred practice is to render the HTML5 once, ...
... and modify it for different devices using CSS3 such as:
/* --- (most) Tablets ------------------------------------- */
@media screen and (min-device-width: 768px) and (max-device-width: 1024px)
and (orientation:portrait){
     h1 { font-size: 2.0rem; }
}
@media screen and (min-device-width: 768px) and (max-device-width: 1024px)
and (orientation:landscape) {
     div#sidebar { display: none; }
}
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
     h1 { font-size: 1.25rem; }
     div#sidebar { display: none; }
}


 05/17/12                     Creating Android Apps w/Phone Gap             slide 22
                                        with Dean Peters
Clound-Based Build Options

 PhoneGap:Build -      https://build.phonegap.com/




 MDS AppLaud Cloud -             http://applaudcloud.com/




05/17/12         Creating Android Apps w/Phone Gap          slide 23
                           with Dean Peters
Q&A

 Here's where you get to stump the chump ...




           & thanks from Dean Peters
                  http://linkd.in/deandroid




05/17/12        Creating Android Apps w/Phone Gap   slide 24
                          with Dean Peters

Contenu connexe

Tendances

Choosing the Right Mobile Development Platform (Part 4)
Choosing the Right Mobile Development Platform (Part 4)Choosing the Right Mobile Development Platform (Part 4)
Choosing the Right Mobile Development Platform (Part 4)Chris Griffith
 
Develop mobile applications with Flex
Develop mobile applications with FlexDevelop mobile applications with Flex
Develop mobile applications with FlexConFoo
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapQuang Minh Dao
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGapJoseph Labrecque
 
Introduction to The Scalable JavaScript Application Framework
Introduction to The Scalable JavaScript Application FrameworkIntroduction to The Scalable JavaScript Application Framework
Introduction to The Scalable JavaScript Application FrameworkEric Bréchemier
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009sullis
 
Using HTML5 to Build Mobile Apps
Using HTML5 to Build Mobile AppsUsing HTML5 to Build Mobile Apps
Using HTML5 to Build Mobile AppsTodd Anglin
 
Mobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMaximiliano Firtman
 
Choosing the Right Mobile Development Platform (Part 3)
Choosing the Right Mobile Development Platform (Part 3)Choosing the Right Mobile Development Platform (Part 3)
Choosing the Right Mobile Development Platform (Part 3)Chris Griffith
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapRamesh Nair
 
Phonegap/Cordova vs Native Application
Phonegap/Cordova vs Native ApplicationPhonegap/Cordova vs Native Application
Phonegap/Cordova vs Native ApplicationMuhammad Hakim A
 
Começando com Android
Começando com AndroidComeçando com Android
Começando com AndroidDextra
 
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
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapPrajyot Mainkar
 
Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Chris Griffith
 
From mobile browser to mobile app
From mobile browser to mobile appFrom mobile browser to mobile app
From mobile browser to mobile appRyan Stewart
 
Apps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapApps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapChristian Grobmeier
 

Tendances (20)

Choosing the Right Mobile Development Platform (Part 4)
Choosing the Right Mobile Development Platform (Part 4)Choosing the Right Mobile Development Platform (Part 4)
Choosing the Right Mobile Development Platform (Part 4)
 
Develop mobile applications with Flex
Develop mobile applications with FlexDevelop mobile applications with Flex
Develop mobile applications with Flex
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 
Introduction to The Scalable JavaScript Application Framework
Introduction to The Scalable JavaScript Application FrameworkIntroduction to The Scalable JavaScript Application Framework
Introduction to The Scalable JavaScript Application Framework
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
Using HTML5 to Build Mobile Apps
Using HTML5 to Build Mobile AppsUsing HTML5 to Build Mobile Apps
Using HTML5 to Build Mobile Apps
 
Mobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance Optimization
 
Choosing the Right Mobile Development Platform (Part 3)
Choosing the Right Mobile Development Platform (Part 3)Choosing the Right Mobile Development Platform (Part 3)
Choosing the Right Mobile Development Platform (Part 3)
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Phonegap/Cordova vs Native Application
Phonegap/Cordova vs Native ApplicationPhonegap/Cordova vs Native Application
Phonegap/Cordova vs Native Application
 
Começando com Android
Começando com AndroidComeçando com Android
Começando com Android
 
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
 
Hybrid HTML5 Apps
Hybrid HTML5 AppsHybrid HTML5 Apps
Hybrid HTML5 Apps
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGap
 
Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5
 
Phone gap
Phone gapPhone gap
Phone gap
 
From mobile browser to mobile app
From mobile browser to mobile appFrom mobile browser to mobile app
From mobile browser to mobile app
 
Apps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapApps with Apache Cordova and Phonegap
Apps with Apache Cordova and Phonegap
 

En vedette

琵琶贈心心_趨勢教育基金會
琵琶贈心心_趨勢教育基金會琵琶贈心心_趨勢教育基金會
琵琶贈心心_趨勢教育基金會kevin liao
 
Hadoop入門とクラウド利用
Hadoop入門とクラウド利用Hadoop入門とクラウド利用
Hadoop入門とクラウド利用Naoki Yanai
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

En vedette (9)

琵琶贈心心_趨勢教育基金會
琵琶贈心心_趨勢教育基金會琵琶贈心心_趨勢教育基金會
琵琶贈心心_趨勢教育基金會
 
Taller hadoop
Taller hadoopTaller hadoop
Taller hadoop
 
Amazon Elastic Computing 2
Amazon Elastic Computing 2Amazon Elastic Computing 2
Amazon Elastic Computing 2
 
Big Data and Hadoop - An Introduction
Big Data and Hadoop - An IntroductionBig Data and Hadoop - An Introduction
Big Data and Hadoop - An Introduction
 
Map Reduce An Introduction
Map Reduce An IntroductionMap Reduce An Introduction
Map Reduce An Introduction
 
Hadoop入門とクラウド利用
Hadoop入門とクラウド利用Hadoop入門とクラウド利用
Hadoop入門とクラウド利用
 
ZapCom Group
ZapCom GroupZapCom Group
ZapCom Group
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Similaire à Creating Android Apps with PhoneGap

Your first web application. From Design to Launch
Your first web application. From Design to LaunchYour first web application. From Design to Launch
Your first web application. From Design to LaunchDavid Brooks
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
MobileDev: panoramica sullo sviluppo Mobile e sulle possibili alternative .Net
 MobileDev: panoramica sullo sviluppo Mobile e sulle possibili alternative .Net MobileDev: panoramica sullo sviluppo Mobile e sulle possibili alternative .Net
MobileDev: panoramica sullo sviluppo Mobile e sulle possibili alternative .NetJOULEHUB GMBH
 
Cross-platform mobile that Works - Coobers
Cross-platform mobile that Works - CoobersCross-platform mobile that Works - Coobers
Cross-platform mobile that Works - CoobersCoobers
 
These are the top 7 alternatives to react native
These are the top 7 alternatives to react nativeThese are the top 7 alternatives to react native
These are the top 7 alternatives to react nativeMoon Technolabs Pvt. Ltd.
 
Making mobile apps with Drupal data
Making mobile apps with Drupal dataMaking mobile apps with Drupal data
Making mobile apps with Drupal dataBart Gysens
 
Native script vs react native for native app development in 2022
Native script vs react native for native app development in 2022Native script vs react native for native app development in 2022
Native script vs react native for native app development in 2022Katy Slemon
 
When to choose and avoid react native for mobile app development
When to choose and avoid react native for mobile app developmentWhen to choose and avoid react native for mobile app development
When to choose and avoid react native for mobile app developmentFullestop
 
Build native android applications with domino
Build native android applications with dominoBuild native android applications with domino
Build native android applications with dominoMichael Butcher
 
Android material design lecture #2
Android material design   lecture #2Android material design   lecture #2
Android material design lecture #2Vitali Pekelis
 
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchJQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchSteve Drucker
 
Droidcon event 2015 Bangalore
Droidcon event 2015 BangaloreDroidcon event 2015 Bangalore
Droidcon event 2015 BangaloreNitesh Verma
 

Similaire à Creating Android Apps with PhoneGap (20)

Your first web application. From Design to Launch
Your first web application. From Design to LaunchYour first web application. From Design to Launch
Your first web application. From Design to Launch
 
Phone gap
Phone gapPhone gap
Phone gap
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
PhoneGap
PhoneGapPhoneGap
PhoneGap
 
Android Stsucture
Android StsuctureAndroid Stsucture
Android Stsucture
 
MobileDev: panoramica sullo sviluppo Mobile e sulle possibili alternative .Net
 MobileDev: panoramica sullo sviluppo Mobile e sulle possibili alternative .Net MobileDev: panoramica sullo sviluppo Mobile e sulle possibili alternative .Net
MobileDev: panoramica sullo sviluppo Mobile e sulle possibili alternative .Net
 
Cross-platform mobile that Works - Coobers
Cross-platform mobile that Works - CoobersCross-platform mobile that Works - Coobers
Cross-platform mobile that Works - Coobers
 
07 PhoneGap
07 PhoneGap07 PhoneGap
07 PhoneGap
 
These are the top 7 alternatives to react native
These are the top 7 alternatives to react nativeThese are the top 7 alternatives to react native
These are the top 7 alternatives to react native
 
Making mobile apps with Drupal data
Making mobile apps with Drupal dataMaking mobile apps with Drupal data
Making mobile apps with Drupal data
 
Phonegap
PhonegapPhonegap
Phonegap
 
Native script vs react native for native app development in 2022
Native script vs react native for native app development in 2022Native script vs react native for native app development in 2022
Native script vs react native for native app development in 2022
 
When to choose and avoid react native for mobile app development
When to choose and avoid react native for mobile app developmentWhen to choose and avoid react native for mobile app development
When to choose and avoid react native for mobile app development
 
Android TCJUG
Android TCJUGAndroid TCJUG
Android TCJUG
 
Build native android applications with domino
Build native android applications with dominoBuild native android applications with domino
Build native android applications with domino
 
Android material design lecture #2
Android material design   lecture #2Android material design   lecture #2
Android material design lecture #2
 
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchJQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
 
Android a brief intro
Android a brief introAndroid a brief intro
Android a brief intro
 
Droidcon event 2015 Bangalore
Droidcon event 2015 BangaloreDroidcon event 2015 Bangalore
Droidcon event 2015 Bangalore
 

Dernier

Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
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
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
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
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 

Dernier (20)

Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
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.
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
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
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 

Creating Android Apps with PhoneGap

  • 1. Creating Android Apps w/PhoneGap with Dean Peters http://linkd.in/deandroid TriDroid@SAS Meetup 7:00pm, Thursday, May 17, 2012 SAS Building S, Room 1051 600 SAS Campus Drive, Cary, NC, Raleigh, NC http://bit.ly/TriDroid17May12 05/17/12 Creating Android Apps w/Phone Gap slide 1 with Dean Peters
  • 2. Introduction Who is this Dean Peters guy? Support Development Team Lead at McClatchy Interactive; Creating Android Apps w/Phone Gap Manages a team of front-end developers ... with Dean Peters Works in the field on arena of online newspapers such as the Miami Herald, Charlotte Observer & the N&O. Is currently working on designing and developing mobile landing pages. Is a web API junkie (but really, I can quit whenever I want to). 05/17/12 Creating Android Apps w/Phone Gap slide 2 with Dean Peters
  • 3. Agenda Presentation Facts Service Size 1 presentation (1hr) Servings Per Container about 45 Introductions 1pg 5% Topical Overview 1pg 5% Technology Stack 1pg Creating Android Apps w/Phone Gap 5% PhoneGap 101 2pg with Dean Peters 5% Applaud & Mulberry 1pg 5% jQuery Mobile & Sencha Touch 2pg 5% jQuick Demo 1pg 5% Code & Compile Walk-Throughs 3pg 15% Latency in the Mobile Domain 3pg 20% AJAX, YQL, CORS & Responsive Design 5pg 20% Cloud-Based Build Options 1pg 5% Q&A 1pg 5% 05/17/12 Creating Android Apps w/Phone Gap slide 3 with Dean Peters
  • 4. Feel free to interact at any time ... Was it something I said? 05/17/12 Creating Android Apps w/Phone Gap slide 4 with Dean Peters
  • 5. Tonight's Technology Stack App CSS3 jQuery Mobile jQuery HTML5 PhoneGap / Cordova Applaud Plugin Eclipse 05/17/12 Creating Android Apps w/Phone Gap slide 5 with Dean Peters
  • 6. PhoneGap, a short & painless history An Open Source mobile framework produced by Nitobi; 1st developed at iPhoneDevCamp San Francisco; Won the 2009 Web 2.0 People's Choice Award Donated to the Apache Foundation in September of 2011; 05/17/12 Creating Android Apps w/Phone Gap with Dean Peters slide 6
  • 7. PhoneGap 101 It is a distribution of Apache Cordova ... to develop native mobile apps leveraging HTML5, CSS3 & JavaScript; field apps for iPhone, Android, Blackberry, WebOS, Symbian & WindowsPhone 7; 05/17/12 Creating Android Apps w/Phone Gap slide 7 with Dean Peters
  • 8. How Do I Get Started? Phone Gap out-of-the-box is not really out-of-the- box Fortunately there are tools to help jump start your project 05/17/12 Creating Android Apps w/Phone Gap slide 8 with Dean Peters
  • 9. AppLaud & Mulberry Two tools designed to to jump-start your PhoneGap development. Mulberry provides a 'Ruby-flavored' toolkit: http://mulberry.toura.com/ AppLaud provides an Eclipse Plugin: http://www.mobiledevelopersolutions.com/ 05/17/12 Creating Android Apps w/Phone Gap slide 9 with Dean Peters
  • 10. How Do I Get Started w/Coding? You don't have to hand-code everything from scratch; There are frameworks and libraries to help you get started. 05/17/12 Creating Android Apps w/Phone Gap slide 10 with Dean Peters
  • 11. jQuery Mobile & Sencha Touch Both provide JavaScript frameworks for mobile development Sencha Touch is built using Ext JS and offers 3 licensing models: http://sencha.com jQuery Mobile is built on jQuery and is Open Source: jquerymobile.com 05/17/12 Creating Android Apps w/Phone Gap slide 11 with Dean Peters
  • 12. Code & Compile Walk-Through 1 60 seconds to Hello TriDroid 05/17/12 Creating Android Apps w/Phone Gap slide 12 with Dean Peters
  • 13. a PhoneGap App Demo What's Behind the Curtain Android SDK http://developer.android.com/sdk/index.html Eclipse Classic or IDE for Java http://www.eclipse.org/downloads/packages/release/helios/sr2 PhoneGap http://wiki.phonegap.com/w/page/30862722/phonegap-android-eclipse-quick Applaud plugin for Eclipse http://www.mobiledevelopersolutions.com/home/start ADT plugin for Eclipse 05/17/12 Creating Android Apps w/Phone Gap slide 13 with Dean Peters
  • 14. Code & Compile Walk-Through 2 The TriDroid News Reader (a truly aggregating app) A baseline app all TriDroid@sas members to download & enjoy Includes jQuery Uses jquery.address.js a history management plugin Imports Foundation, a CSS3 framework for responsive web design Leverages YQL to provide CORS–ready jSON 05/17/12 Creating Android Apps w/Phone Gap slide 14 with Dean Peters
  • 15. What type of issues will I encounter? Three issues of you're likely to run into when writing an RSS reader are: Cross-Domain restrictions built into JavaScript's XMLHttpRequest. Latency in the data delivery. Latency in the rendering of the data. 05/17/12 Creating Android Apps w/Phone Gap slide 15 with Dean Peters
  • 16. CORS CORS == Cross-Origin Resource Sharing Below is an example that would support requests from both REST and SOAP from domains1.com and domain-two.com. <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "domain1.com" Header set Access-Control-Allow-Methods "GET,PUT,POST,OPTIONS" Header set Access-Control-Allow-Headers "Content-Type" Header set Access-Control-Allow-Credentials "true" Header set Access-Control-Accept-Encoding "gzip,deflate" Header set Access-Control-Allow-Headers: "X-File-Name,X-File- Type,X-File-Size" Header append Access-Control-Allow-Origin "domain-two.com" Header append Access-Control-Allow-Headers "Origin" Header append Access-Control-Allow-Headers "Accept" Header append Access-Control-Allow-Headers "X-Requested-With" 05/17/12 Creating Android Apps w/Phone Gap slide 16 with Dean Peters
  • 17. Latency in the Mobile Domain Source: http://www.gomez.com/thank-you/what-users-want-from-mobile-infographic/ 05/17/12 Creating Android Apps w/Phone Gap slide 17 with Dean Peters
  • 18. Latency in the Mobile Domain Source: http://dylan.tweney.com/2012/02/21/startups-struggle-to-keep-their-sites-speedy-on-pcs-phones-and-tablets/ 05/17/12 Creating Android Apps w/Phone Gap slide 18 with Dean Peters
  • 19. Latency in the Mobile Domain The Same App Across Different Networks == Different User Experiences Source: http://www.slideshare.net/Gomez_Inc/the-state-of-the-mobile-market-what-endusers-want-from-mobile 05/17/12 Creating Android Apps w/Phone Gap slide 19 with Dean Peters
  • 20. Latency in the Mobile Domain The 'A' in AJAX is for Asynchronous Avoid JavaScript when responsive HTML5 & CSS3 will do. Do less with the DOM Consider farming out heavy rendering to web services. Consider porting heavy JavaScript from the app to a service platform such as Node.js 05/17/12 Creating Android Apps w/Phone Gap slide 20 with Dean Peters
  • 21. The A in AJAX for Asynchronous Use CORS or proxies rather than jSON-p Use frameworks such as jQuery that allow you to defer, cache and queue actions, such as: function getData( val ){ // return either the cached value or an // jqXHR object (which contains a promise) return window.caches.cache[ val ]|| $.ajax('/mywebservice/', { data: { value: val }, dataType: 'json', success: function( resp ){ // create a cache in the windows object window.caches.cache[ val ] = resp; } }); } // this wraps the 'getData()' ajax call $.when(getData('foo')).then(function(resp){ // do something with the response, which may // or may not have been retrieved using an // XHR request. }); 05/17/12 Creating Android Apps w/Phone Gap slide 21 with Dean Peters
  • 22. Responsive Design While you can use JavaScript to deal with different devices ... ... the preferred practice is to render the HTML5 once, ... ... and modify it for different devices using CSS3 such as: /* --- (most) Tablets ------------------------------------- */ @media screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:portrait){ h1 { font-size: 2.0rem; } } @media screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:landscape) { div#sidebar { display: none; } } /* Smartphones (portrait and landscape) ----------- */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { h1 { font-size: 1.25rem; } div#sidebar { display: none; } } 05/17/12 Creating Android Apps w/Phone Gap slide 22 with Dean Peters
  • 23. Clound-Based Build Options PhoneGap:Build - https://build.phonegap.com/ MDS AppLaud Cloud - http://applaudcloud.com/ 05/17/12 Creating Android Apps w/Phone Gap slide 23 with Dean Peters
  • 24. Q&A Here's where you get to stump the chump ... & thanks from Dean Peters http://linkd.in/deandroid 05/17/12 Creating Android Apps w/Phone Gap slide 24 with Dean Peters