SlideShare a Scribd company logo
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

More Related Content

What's hot

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 PhoneGap
Quang Minh Dao
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
Joseph 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 Framework
Eric Bréchemier
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
sullis
 
Using HTML5 to Build Mobile Apps
Using HTML5 to Build Mobile AppsUsing HTML5 to Build Mobile Apps
Using HTML5 to Build Mobile Apps
Todd Anglin
 
Mobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance Optimization
Maximiliano 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 PhoneGap
Ramesh Nair
 
Phonegap/Cordova vs Native Application
Phonegap/Cordova vs Native ApplicationPhonegap/Cordova vs Native Application
Phonegap/Cordova vs Native Application
Muhammad Hakim A
 
Começando com Android
Começando com AndroidComeçando com Android
Começando com Android
Dextra
 
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
Nick Landry
 
Hybrid HTML5 Apps
Hybrid HTML5 AppsHybrid HTML5 Apps
Hybrid HTML5 Apps
Hugo Rodrigues
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGap
Prajyot 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 CS5
Chris Griffith
 
From mobile browser to mobile app
From mobile browser to mobile appFrom mobile browser to mobile app
From mobile browser to mobile app
Ryan Stewart
 
Apps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapApps with Apache Cordova and Phonegap
Apps with Apache Cordova and Phonegap
Christian Grobmeier
 

What's hot (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
 

Viewers also liked

琵琶贈心心_趨勢教育基金會
琵琶贈心心_趨勢教育基金會琵琶贈心心_趨勢教育基金會
琵琶贈心心_趨勢教育基金會kevin liao
 
Taller hadoop
Taller hadoopTaller hadoop
Taller hadoop
Christian Ariza Porras
 
Amazon Elastic Computing 2
Amazon Elastic Computing 2Amazon Elastic Computing 2
Amazon Elastic Computing 2
Athanasios Anastasiou
 
Big Data and Hadoop - An Introduction
Big Data and Hadoop - An IntroductionBig Data and Hadoop - An Introduction
Big Data and Hadoop - An Introduction
Nagarjuna Kanamarlapudi
 
Map Reduce An Introduction
Map Reduce An IntroductionMap Reduce An Introduction
Map Reduce An Introduction
Nagarjuna Kanamarlapudi
 
Hadoop入門とクラウド利用
Hadoop入門とクラウド利用Hadoop入門とクラウド利用
Hadoop入門とクラウド利用Naoki Yanai
 
ZapCom Group
ZapCom GroupZapCom Group
ZapCom Group
Umesh Lakshmipathy
 
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
LinkedIn
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
Luminary Labs
 

Viewers also liked (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
 

Similar to 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 Launch
David Brooks
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
Khirulnizam Abd Rahman
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
Troy Miles
 
Android Stsucture
Android StsuctureAndroid Stsucture
Android Stsucture
Kartik Kalpande Patil
 
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
JOULEHUB GMBH
 
Cross-platform mobile that Works - Coobers
Cross-platform mobile that Works - CoobersCross-platform mobile that Works - Coobers
Cross-platform mobile that Works - Coobers
Coobers
 
07 PhoneGap
07 PhoneGap07 PhoneGap
07 PhoneGap
Ynon Perek
 
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
Moon 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 data
Bart 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 2022
Katy 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 development
Fullestop
 
Android TCJUG
Android TCJUGAndroid TCJUG
Android TCJUG
Justin Grammens
 
Build native android applications with domino
Build native android applications with dominoBuild native android applications with domino
Build native android applications with domino
Michael Butcher
 
Android material design lecture #2
Android material design   lecture #2Android material design   lecture #2
Android material design lecture #2
Vitali 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 Touch
Steve Drucker
 
Android a brief intro
Android a brief introAndroid a brief intro
Android a brief intro
Kieran Gutteridge
 
Droidcon event 2015 Bangalore
Droidcon event 2015 BangaloreDroidcon event 2015 Bangalore
Droidcon event 2015 Bangalore
Nitesh Verma
 

Similar to 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
 

Recently uploaded

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

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