SlideShare a Scribd company logo
1 of 98
Download to read offline
Patrick Crowley
  the.railsi.st
Mobile web apps
 using jQTouch
What’s your
mobile strategy?
• Website (aka “give up”)
• Website (aka “give up”)
• Website + mobile stylesheet
• Website (aka “give up”)
• Website + mobile stylesheet
• Native apps for iPhone and
 Android (awesome, but $$$)
• Optimize for mobile displays
• Optimize for mobile displays
• Reduce page load time
• Optimize for mobile displays
• Reduce page load time
• Reduce network traffic
• Optimize for mobile displays
• Reduce page load time
• Reduce network traffic
• Support gestures
Smartphone Market Share
                    RIM       iPhone        Windows    Android   Other




                                       9%
                                 9%
                                                      35%


                              19%




                                             28%



Source: Nielsen for Q1 2010
Mobile Browser Usage
                       iPhone            Android   RIM    Other




                                          6%
                                   13%




                                23%
                                                    58%




Source: Net Applications for May 2010
What does this mean?
• Website (aka “do nothing”)
• Website (aka “do nothing”)
• Website + mobile stylesheets
• Website (aka “do nothing”)
• Website + mobile stylesheets
• Native apps for iPhone and
 Android (awesome, but $$$)
• Website (aka “do nothing”)
• Website + mobile stylesheets
• Native apps for iPhone and
 Android (awesome, but $$$)

• Website + mobile web app
Mobile strategy = Webkit
Target mobile browsers
  people actually use.
• More than 81% of mobile
 browser traffic
• More than 81% of mobile
 browser traffic

• iOS (iPhone + iPod Touch)
• More than 81% of mobile
 browser traffic

• iOS (iPhone + iPod Touch)
• Android (1.5 and up)
• More than 81% of mobile
 browser traffic

• iOS (iPhone + iPod Touch)
• Android (1.5 and up)
• WebOS (Palm -> HP)
• More than 81% of mobile
 browser traffic

• iOS (iPhone + iPod Touch)
• Android (1.5 and up)
• WebOS (Palm -> HP)
• Blackberry (future)
What about... ?!?!
S T
 O A
T
Who cares?
Browsing already
sucks on these phones
So optimize for
awesome phones!
Why Webkit?
• Web standards
• Web standards
• Consistent rendering
• Web standards
• Consistent rendering
• Support for HTML5
• Web standards
• Consistent rendering
• Support for HTML5
• Animation
• Web standards
• Consistent rendering
• Support for HTML5
• Animation
• Offline caching
jQTouch
Web apps with native
   look and feel
jQuery + jQTouch + HTML
jQTouch 101
1. Getting started
<script type="text/javascript" src="http://www.google.com/
jsapi"></script>
<script type="text/javascript" src="http://www.google.com/
jsapi"></script>


<script type="text/javascript"> google.load("jquery",
"1.3.2");</script>
<script type="text/javascript" src="http://www.google.com/
jsapi"></script>


<script type="text/javascript"> google.load("jquery",
"1.3.2");</script>


<script src="jqtouch/jqtouch.min.js" type="application/x-
javascript" charset="utf-8"></script>
<script type="text/javascript" src="http://www.google.com/
jsapi"></script>


<script type="text/javascript"> google.load("jquery",
"1.3.2");</script>


<script src="jqtouch/jqtouch.min.js" type="application/x-
javascript" charset="utf-8"></script>


<style type="text/css" media="screen">@import "jqtouch/
jqtouch.min.css";</style>
<script type="text/javascript" src="http://www.google.com/
jsapi"></script>


<script type="text/javascript"> google.load("jquery",
"1.3.2");</script>


<script src="jqtouch/jqtouch.min.js" type="application/x-
javascript" charset="utf-8"></script>


<style type="text/css" media="screen">@import "jqtouch/
jqtouch.min.css";</style>


<style type="text/css" media="screen">@import "themes/jqt/
theme.min.css";</style>
$.jQTouch({
    icon: 'jqtouch.png',
    statusBar: 'black-translucent',
    preloadImages: [
        'themes/jqt/img/chevron_white.png',
        'themes/jqt/img/bg_row_select.gif',
        'themes/jqt/img/back_button_clicked.png',
        'themes/jqt/img/button_clicked.png'
        ]
});
2. Basic page layout
index.html
<body>
  <div class="current" id="home">
    <div class="toolbar">
       <h1>jQTouch Demo</h1>
    </div>

    <!-- CONTENT GOES HERE -->

  </div>
</body>
#about




              #blog

index.html

             #contact




              /video
index.html
<div id="about">
  <div class="toolbar">
    <h1>About Us</h1>
  </div>
</div>

<div id="blog">
  <div class="toolbar">
    <h1>Blog</h1>
  </div>
</div>

<div id="about">
  <div class="toolbar">
    <h1>Contact Us</h1>
  </div>
</div>
#about




              #blog

index.html

             #contact




              /video
video.html
<div id="video">
  <div class="toolbar">
    <h1>Video</h1>
  </div>
</div>
Markup-based UI
Classes => behavior
• Toolbars
• Toolbars
• Lists
• Toolbars
• Lists
• Buttons
• Toolbars
• Lists
• Buttons
• Forms
• Toolbars
• Lists
• Buttons
• Forms
• Navigation
Toolbar
<div id="about">
  <div class="toolbar">
    <h1>About Us</h1>
  </div>
</div>

<div id="blog">
  <div class="toolbar">
    <h1>Blog</h1>
  </div>
</div>

<div id="about">
  <div class="toolbar">
    <h1>Contact Us</h1>
  </div>
</div>
List
<ul class="rounded">
  <li class="arrow"><a   href="#about">About Us</a></li>
  <li class="arrow"><a   href="#blog">Blog</a></li>
  <li class="arrow"><a   href="#contact">Contact Us</a></li>
  <li class="arrow"><a   href="/video">Video</a></li>
</ul>
UI Demo
Sample app
Debugging
• iPhone Simulator
• iPhone Simulator
• Android Simulator
• iPhone Simulator
• Android Simulator
• Actual devices!!!
Mobile detection
// Mobile clients
if (navigator.userAgent.match(/Android/i) ||
    navigator.userAgent.match(/webOS/i) ||
    navigator.userAgent.match(/iPhone/i) ||
    navigator.userAgent.match(/iPod/i)) {

    // Redirect to mobile app
    location.href = "/mobile";

}
Version switching
<--->
Dynamic content filters
// Disable links
$('.page').live('pageAnimationStart',
function(){
    $('p a').attr("href", "");
});
Resources
• jqtouch.com
• jqtouch.com
• github.com/senchalabs/jQTouch
• jqtouch.com
• github.com/senchalabs/jQTouch
• peepcode.com/products/jqtouch
• jqtouch.com
• github.com/senchalabs/jQTouch
• peepcode.com/products/jqtouch
• glyphish.com
Coming soon
Sencha
Ext JS + jQTouch + Raphaël
New roadmap and
maintainer for jQTouch
The End

More Related Content

Viewers also liked (8)

Paperclip
PaperclipPaperclip
Paperclip
 
Migrating Legacy Data
Migrating Legacy DataMigrating Legacy Data
Migrating Legacy Data
 
Trucker
TruckerTrucker
Trucker
 
CSS for iPhones
CSS for iPhonesCSS for iPhones
CSS for iPhones
 
Compass
CompassCompass
Compass
 
Migrating Legacy Data (Ruby Midwest)
Migrating Legacy Data (Ruby Midwest)Migrating Legacy Data (Ruby Midwest)
Migrating Legacy Data (Ruby Midwest)
 
Compass & Bearings
Compass & BearingsCompass & Bearings
Compass & Bearings
 
Compass
CompassCompass
Compass
 

Similar to Mobile web apps

Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
davyjones
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
Chris Morrell
 
Image-ine That: Image Optimization for Conversion Maximization
Image-ine That: Image Optimization for Conversion MaximizationImage-ine That: Image Optimization for Conversion Maximization
Image-ine That: Image Optimization for Conversion Maximization
Yottaa
 

Similar to Mobile web apps (20)

The future is mobile
The future is mobileThe future is mobile
The future is mobile
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Web app
Web appWeb app
Web app
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Web app
Web appWeb app
Web app
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
Image-ine That: Image Optimization for Conversion Maximization
Image-ine That: Image Optimization for Conversion MaximizationImage-ine That: Image Optimization for Conversion Maximization
Image-ine That: Image Optimization for Conversion Maximization
 
Mobile for web developers
Mobile for web developersMobile for web developers
Mobile for web developers
 
Responsive Web Design - Why and How
Responsive Web Design - Why and HowResponsive Web Design - Why and How
Responsive Web Design - Why and How
 
Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5
 
Mobilism 2011: How to put the mobile in the mobile web
Mobilism 2011: How to put the mobile in the mobile webMobilism 2011: How to put the mobile in the mobile web
Mobilism 2011: How to put the mobile in the mobile web
 
Mobile SEO (English Version)
Mobile SEO (English Version)Mobile SEO (English Version)
Mobile SEO (English Version)
 
Get Mobile | Mobile & Digital Marketing | Crystal Olig | Upward | Oxiem
Get Mobile | Mobile & Digital Marketing | Crystal Olig | Upward | OxiemGet Mobile | Mobile & Digital Marketing | Crystal Olig | Upward | Oxiem
Get Mobile | Mobile & Digital Marketing | Crystal Olig | Upward | Oxiem
 
Mobile Web High Performance
Mobile Web High PerformanceMobile Web High Performance
Mobile Web High Performance
 
High Performance Distribution for Harvard Video, Mobile and the Gazette
High Performance Distribution for Harvard Video, Mobile and the GazetteHigh Performance Distribution for Harvard Video, Mobile and the Gazette
High Performance Distribution for Harvard Video, Mobile and the Gazette
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make it
 
Simple mobile Websites
Simple mobile WebsitesSimple mobile Websites
Simple mobile Websites
 
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issuesMaximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
 
Responding to the challenge of the mobile web (2012)
Responding to the challenge of the mobile web (2012)Responding to the challenge of the mobile web (2012)
Responding to the challenge of the mobile web (2012)
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Mobile web apps