SlideShare a Scribd company logo
Mobile Web Development with HTML5

Roy Clarkson and Josh Long
SpringSource, a division of VMware

@royclarkson & @starbuxman




© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Agenda

•   Introduction
•   Define the Problem
•   Mobile Browsers
•   Hardware Concerns
•   Simulators and Emulators
•   HTML5
•   JavaScript Frameworks




2
Introduction
    The mobile web refers to the use of web sites or web based
    applications by non-traditional devices or appliances that may
    not have the same capabilities as a modern desktop browser.




3
What problem are we trying to solve?

• Mobile devices have become ubiquitous in our every day
  lives.
• Many people are spending more time on mobile devices
  than on traditional computers.
• How do we present our web sites in a manner that is
  accessible to as many of these different devices as
  possible?




4
What is the solution?

• Most HTML5 features are available on all modern smart
  phones and tablet devices.




5
Why does it matter?

• More people are consuming web sites through their mobile
  devices than through traditional desktop browsers




6
Mobile Browsers




7
Support across browsers
•   Compatibility tables for support of HTML5, CSS3, SVG and more in desktop
    and mobile browsers. -caniuse.com




8
Support across browsers
•   Compatibility tables for support of HTML5, CSS3, SVG and more in desktop
    and mobile browsers. -caniuse.com




9
Hardware Concerns

•    Screen resolution
•    Network connectivity
•    Hardware acceleration
•    Cache size
•    Processor speed
•    Memory




10
Simulators and Emulators




11
Simulators and Emulators




12
Simulators and Emulators




13
Simulators and Emulators




14
HTML5

     Semantics
     Offline Storage
     Device Access
     Connectivity
     Multimedia
     3D, Graphics & Effects
     Performance & Integration
     CSS3 Styling




15
Semantics

• Rich set of tags
• Microdata
• Microformats




16
Rich set of Tags

       <!DOCTYPE html>
       <html>
       <body>
       	      <header>HEADER</header>
       	      <section>
       	      	       <hgroup>
       	      	       	       <h1>title</h1>
       	      	       </hgroup>
       	      	       <article>some text</article>
       	      </section>
       	      <footer>FOOTER</footer>
       </body>
       </html>




17
Microformats




18
Offline Storage

•    Application Cache
•    Local Storage
•    Web SQL
•    Online/Offline Events




19
Application Cache




20
Application Cache

• Specify a cache

     <html manifest="myCustomCache.appcache">
      ...
     </html>


• List out cacheable assets
      CACHE MANIFEST
      index.html
      stylesheet.css
      images/logo.png
      scripts/main.js




21
window.sessionStorage and window.localStorage
 • setItem(string name, string value)
   add or update a value in the store

 • getItem(string name)
   get a named value from the store

 • removeItem(string name)
   remove a named value from the store

 • length
   number of values stored

 • key(long index)
   name of the key at the index

 • clear()
   clear the store
22
Online and Offline Events
document.body.addEventListener("offline", function () {  
          ...
       }, false);  

document.body.addEventListener("online", function () {  
           ...
       }, false);  




23
Online and Offline Events (jQuery)



$(window).bind("offline", function() {

 ...

 }); 




24
Web SQL

     var db = window.openDatabase(
        "Spring Test", "1.0",
        "HTML5 Database API example", 200000);

     db.transaction(function (transaction) {
       var sql = ... ;
       transaction.executeSql(
         sql , [], nullDataHandler, errorHandler);

     }) ;




25
Multimedia

• Audio
• Video




26
Audio Tags

      <audio controls preload="auto" autobuffer>
       <source src="le_long_de_la_route.mp3" />
       <source src="le_long_de_la_route.ogg" />
      </audio>

Browser          Ogg Vorbis   MP3       WAV
Android                X            X
Opera Mobile                        X
Firefox Mobile         X                      X
iOS Safari                          X         X


 27
Video Tags

      <video width="320" height="240" controls="controls">
       <source src="movie.mp4" type="video/mp4" />
       Your browser does not support the video tag.
      </video>



Browser               MP4/H.264           3GP/MPEG4
iOS                            X
Android                        X                  X
Blackberry                     X                  X
Older devices                                     X


 28
Device Access
•    Geolocation*
•    Camera
•    Microphone
•    Contacts




29
Geolocation




30
Geolocation




31
Geolocation


 navigator.geolocation.getCurrentPosition(
  function(position){

     var longitude = position.coords.longitude,
        latitude = position.coords.latitude ;

     ...

 }, errorHandler);




32
(PhoneGap) Camera API

 function onSuccess(imageURI) {
     var image = document.getElementById('myImage');
     image.src = imageURI;
 }

 function onFail(message) {
     alert('Failed because: ' + message);
 }

 navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
     destinationType: Camera.DestinationType.FILE_URI });




33
(PhoneGap) Microphone API
     // capture callback
     var captureSuccess = function(mediaFiles) {
        var i, path, len;
        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
          path = mediaFiles[i].fullPath;
          // do something interesting with the file
        }
     };

     // capture error callback
     var captureError = function(error) {
        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
     };

     // start audio capture
     navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:
     2});



34
(PhoneGap) Find Contact API
 function onSuccess(contacts) {
    alert('Found ' + contacts.length + ' contacts.');
 };

 function onError(contactError) {
    alert('onError!');
 };

 // find all contacts with 'Bob' in any name field
 var options = new ContactFindOptions();
 options.filter="Bob";
 var fields = ["displayName", "name"];
 navigator.contacts.find(fields, onSuccess, onError, options);


35
Connectivity

• Web Sockets *
• Server-Sent Events (don’t bother)




36
Web Sockets

     if ("WebSocket" in window) {

       var ws = new WebSocket("ws://localhost:9998/echo");

          ws.onopen = function() {
             ws.send("Message to send");
          };

          ws.onmessage = function (evt) {
            var receivedMessage = evt.data;
          };
          ws.onclose = function(){
            alert("Connection is closed...");
          };
      }



37
3D, Graphics, & Effects

•    Canvas
•    CSS3 3D features
•    WebGL *
•    SVG *




38
Canvas




39
Performance & Integration

• XMLHttpRequest 2




40
Styling

•    CSS3
•    2D/3D Transformations
•    Transitions
•    WebFonts




41
CSS3 Media Queries

     @media only screen and (max-device-width: 480px) {
         ...

     	     div#header h1 {
     	     	     font-size: 140%;
     	     }

         ...
     }




42
CSS3 Transformations




43
CSS3 Transformations

     #id_of_element {
     	 -webkit-transition: all 1s ease-in-out;
     	 -moz-transition: all 1s ease-in-out;
     	 -o-transition: all 1s ease-in-out;
     	 -ms-transition: all 1s ease-in-out;
     	 transition: all 1s ease-in-out;
     }




44
JavaScript Frameworks

•    jQuery Mobile
•    Sencha Touch
•    Jo
•    jQTouch
•    xui
•    Lawnchair
•    EmbedJS




45
jQuery Mobile

• Touch-optimized web framework for smart phones and
  tablets
• Built on jQuery
• Supports iOS, Android, Blackberry, Windows Phone,
  webOS, symbian, bada, and MeeGo
• 1.0 RC1 released September 29
• jquerymobile.com




46
Sencha Touch

•    HTML5 Mobile Web App Framework
•    Supports iPhone, Android, and Blackberry
•    Version 1.1.1 released October 12
•    2.0.0 Preview Release 1 released on October 11
•    sencha.com/products/touch




47
Jo

• Designed for apps, not web sites.
• Supports iOS, Android, webOS, Blackberry, Chrome OS
• Version 0.4.1




48
Additional Resources

• http://www.w3.org/Mobile
• http://www.html5rocks.com
• http://www.mobilexweb.com/emulators




49
Q&A




50   © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.

More Related Content

What's hot

Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
Sasha dos Santos
 
Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!
Matheus Cardoso
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
ejlp12
 
Building Mobile Applications with Ionic
Building Mobile Applications with IonicBuilding Mobile Applications with Ionic
Building Mobile Applications with Ionic
Morris Singer
 
Hybrid app development with ionic
Hybrid app development with ionicHybrid app development with ionic
Hybrid app development with ionic
Wan Muzaffar Wan Hashim
 
Cordova 3, apps para android
Cordova 3, apps para androidCordova 3, apps para android
Cordova 3, apps para android
Droidcon Spain
 
Cross-platform development frameworks
Cross-platform development frameworksCross-platform development frameworks
Cross-platform development frameworks
Carlo Bernaschina
 
Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008
sullis
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
CocoaHeads France
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
Ted Chien
 
Ionic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the WebIonic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the Web
Mike Hartington
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App Development
Malan Amarasinghe
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
Thinh VoXuan
 
Apache cordova
Apache cordovaApache cordova
Apache cordova
Carlo Bernaschina
 
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesIonic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
Jacob Friesen
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
rajkamaltibacademy
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
Raymond Camden
 
Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.
Matheus Cardoso
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 

What's hot (20)

Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
Building Mobile Applications with Ionic
Building Mobile Applications with IonicBuilding Mobile Applications with Ionic
Building Mobile Applications with Ionic
 
Hybrid app development with ionic
Hybrid app development with ionicHybrid app development with ionic
Hybrid app development with ionic
 
Cordova 3, apps para android
Cordova 3, apps para androidCordova 3, apps para android
Cordova 3, apps para android
 
Cross-platform development frameworks
Cross-platform development frameworksCross-platform development frameworks
Cross-platform development frameworks
 
Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
 
Ionic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the WebIonic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the Web
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App Development
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Apache cordova
Apache cordovaApache cordova
Apache cordova
 
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesIonic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 

Similar to Mobile Web Development with HTML5

Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Frédéric Harper
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Frédéric Harper
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
Adam Lu
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bend
Raj Lal
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
Michael Galpin
 
Html5 on mobile
Html5 on mobileHtml5 on mobile
Html5 on mobile
Blueinfy Solutions
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
Pravasini Sahoo
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOSKevin Decker
 
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5  [IndicThreads Mobile Application Develop...Mobile Web Applications using HTML5  [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
IndicThreads
 
VizEx View HTML5 workshop 2017
VizEx View HTML5 workshop 2017VizEx View HTML5 workshop 2017
VizEx View HTML5 workshop 2017
Larson Software Technology
 
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 Todaydavyjones
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)
Adam Lu
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
Nagendra Um
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
Chris Mills
 
HTML for the Mobile Web, Firefox OS
HTML for the Mobile Web, Firefox OSHTML for the Mobile Web, Firefox OS
HTML for the Mobile Web, Firefox OS
All Things Open
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010Patrick Lauke
 
Codestrong 2012 breakout session introduction to mobile web and best practices
Codestrong 2012 breakout session   introduction to mobile web and best practicesCodestrong 2012 breakout session   introduction to mobile web and best practices
Codestrong 2012 breakout session introduction to mobile web and best practicesAxway Appcelerator
 
Html5
Html5Html5
Html5
Sai Anjani
 
Web dev tools review
Web dev tools reviewWeb dev tools review
Web dev tools reviewChanghyun Lee
 
VizEx View HTML5 Workshop
VizEx View HTML5 WorkshopVizEx View HTML5 Workshop
VizEx View HTML5 Workshop
Larson Software Technology
 

Similar to Mobile Web Development with HTML5 (20)

Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bend
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
 
Html5 on mobile
Html5 on mobileHtml5 on mobile
Html5 on mobile
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
 
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5  [IndicThreads Mobile Application Develop...Mobile Web Applications using HTML5  [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
 
VizEx View HTML5 workshop 2017
VizEx View HTML5 workshop 2017VizEx View HTML5 workshop 2017
VizEx View HTML5 workshop 2017
 
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
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
 
HTML for the Mobile Web, Firefox OS
HTML for the Mobile Web, Firefox OSHTML for the Mobile Web, Firefox OS
HTML for the Mobile Web, Firefox OS
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
 
Codestrong 2012 breakout session introduction to mobile web and best practices
Codestrong 2012 breakout session   introduction to mobile web and best practicesCodestrong 2012 breakout session   introduction to mobile web and best practices
Codestrong 2012 breakout session introduction to mobile web and best practices
 
Html5
Html5Html5
Html5
 
Web dev tools review
Web dev tools reviewWeb dev tools review
Web dev tools review
 
VizEx View HTML5 Workshop
VizEx View HTML5 WorkshopVizEx View HTML5 Workshop
VizEx View HTML5 Workshop
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
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
 
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
 
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
 
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
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
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
 
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
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
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
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
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...
 
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
 
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...
 
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
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
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
 
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...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
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...
 

Mobile Web Development with HTML5

  • 1. Mobile Web Development with HTML5 Roy Clarkson and Josh Long SpringSource, a division of VMware @royclarkson & @starbuxman © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
  • 2. Agenda • Introduction • Define the Problem • Mobile Browsers • Hardware Concerns • Simulators and Emulators • HTML5 • JavaScript Frameworks 2
  • 3. Introduction The mobile web refers to the use of web sites or web based applications by non-traditional devices or appliances that may not have the same capabilities as a modern desktop browser. 3
  • 4. What problem are we trying to solve? • Mobile devices have become ubiquitous in our every day lives. • Many people are spending more time on mobile devices than on traditional computers. • How do we present our web sites in a manner that is accessible to as many of these different devices as possible? 4
  • 5. What is the solution? • Most HTML5 features are available on all modern smart phones and tablet devices. 5
  • 6. Why does it matter? • More people are consuming web sites through their mobile devices than through traditional desktop browsers 6
  • 8. Support across browsers • Compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers. -caniuse.com 8
  • 9. Support across browsers • Compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers. -caniuse.com 9
  • 10. Hardware Concerns • Screen resolution • Network connectivity • Hardware acceleration • Cache size • Processor speed • Memory 10
  • 15. HTML5 Semantics Offline Storage Device Access Connectivity Multimedia 3D, Graphics & Effects Performance & Integration CSS3 Styling 15
  • 16. Semantics • Rich set of tags • Microdata • Microformats 16
  • 17. Rich set of Tags <!DOCTYPE html> <html> <body> <header>HEADER</header> <section> <hgroup> <h1>title</h1> </hgroup> <article>some text</article> </section> <footer>FOOTER</footer> </body> </html> 17
  • 19. Offline Storage • Application Cache • Local Storage • Web SQL • Online/Offline Events 19
  • 21. Application Cache • Specify a cache <html manifest="myCustomCache.appcache"> ... </html> • List out cacheable assets CACHE MANIFEST index.html stylesheet.css images/logo.png scripts/main.js 21
  • 22. window.sessionStorage and window.localStorage • setItem(string name, string value) add or update a value in the store • getItem(string name) get a named value from the store • removeItem(string name) remove a named value from the store • length number of values stored • key(long index) name of the key at the index • clear() clear the store 22
  • 23. Online and Offline Events document.body.addEventListener("offline", function () {   ...        }, false);   document.body.addEventListener("online", function () {   ...        }, false);   23
  • 24. Online and Offline Events (jQuery) $(window).bind("offline", function() {  ...  });  24
  • 25. Web SQL var db = window.openDatabase( "Spring Test", "1.0", "HTML5 Database API example", 200000); db.transaction(function (transaction) { var sql = ... ;   transaction.executeSql( sql , [], nullDataHandler, errorHandler); }) ; 25
  • 27. Audio Tags <audio controls preload="auto" autobuffer> <source src="le_long_de_la_route.mp3" /> <source src="le_long_de_la_route.ogg" /> </audio> Browser Ogg Vorbis MP3 WAV Android X X Opera Mobile X Firefox Mobile X X iOS Safari X X 27
  • 28. Video Tags <video width="320" height="240" controls="controls"> <source src="movie.mp4" type="video/mp4" /> Your browser does not support the video tag. </video> Browser MP4/H.264 3GP/MPEG4 iOS X Android X X Blackberry X X Older devices X 28
  • 29. Device Access • Geolocation* • Camera • Microphone • Contacts 29
  • 32. Geolocation navigator.geolocation.getCurrentPosition( function(position){ var longitude = position.coords.longitude, latitude = position.coords.latitude ; ... }, errorHandler); 32
  • 33. (PhoneGap) Camera API function onSuccess(imageURI) {     var image = document.getElementById('myImage');     image.src = imageURI; } function onFail(message) {     alert('Failed because: ' + message); } navigator.camera.getPicture(onSuccess, onFail, { quality: 50,     destinationType: Camera.DestinationType.FILE_URI }); 33
  • 34. (PhoneGap) Microphone API // capture callback var captureSuccess = function(mediaFiles) { var i, path, len; for (i = 0, len = mediaFiles.length; i < len; i += 1) { path = mediaFiles[i].fullPath; // do something interesting with the file } }; // capture error callback var captureError = function(error) { navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error'); }; // start audio capture navigator.device.capture.captureAudio(captureSuccess, captureError, {limit: 2}); 34
  • 35. (PhoneGap) Find Contact API function onSuccess(contacts) { alert('Found ' + contacts.length + ' contacts.'); }; function onError(contactError) { alert('onError!'); }; // find all contacts with 'Bob' in any name field var options = new ContactFindOptions(); options.filter="Bob"; var fields = ["displayName", "name"]; navigator.contacts.find(fields, onSuccess, onError, options); 35
  • 36. Connectivity • Web Sockets * • Server-Sent Events (don’t bother) 36
  • 37. Web Sockets if ("WebSocket" in window) { var ws = new WebSocket("ws://localhost:9998/echo"); ws.onopen = function() { ws.send("Message to send"); }; ws.onmessage = function (evt) { var receivedMessage = evt.data; }; ws.onclose = function(){ alert("Connection is closed..."); }; } 37
  • 38. 3D, Graphics, & Effects • Canvas • CSS3 3D features • WebGL * • SVG * 38
  • 40. Performance & Integration • XMLHttpRequest 2 40
  • 41. Styling • CSS3 • 2D/3D Transformations • Transitions • WebFonts 41
  • 42. CSS3 Media Queries @media only screen and (max-device-width: 480px) { ... div#header h1 { font-size: 140%; } ... } 42
  • 44. CSS3 Transformations #id_of_element { -webkit-transition: all 1s ease-in-out; -moz-transition: all 1s ease-in-out; -o-transition: all 1s ease-in-out; -ms-transition: all 1s ease-in-out; transition: all 1s ease-in-out; } 44
  • 45. JavaScript Frameworks • jQuery Mobile • Sencha Touch • Jo • jQTouch • xui • Lawnchair • EmbedJS 45
  • 46. jQuery Mobile • Touch-optimized web framework for smart phones and tablets • Built on jQuery • Supports iOS, Android, Blackberry, Windows Phone, webOS, symbian, bada, and MeeGo • 1.0 RC1 released September 29 • jquerymobile.com 46
  • 47. Sencha Touch • HTML5 Mobile Web App Framework • Supports iPhone, Android, and Blackberry • Version 1.1.1 released October 12 • 2.0.0 Preview Release 1 released on October 11 • sencha.com/products/touch 47
  • 48. Jo • Designed for apps, not web sites. • Supports iOS, Android, webOS, Blackberry, Chrome OS • Version 0.4.1 48
  • 49. Additional Resources • http://www.w3.org/Mobile • http://www.html5rocks.com • http://www.mobilexweb.com/emulators 49
  • 50. Q&A 50 © 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.