SlideShare a Scribd company logo
#devTO
  Web ‘apps’ using HTML5 and JS



BH CONSULTING   #devTO August 29, 2011
Mobile Browser vs App - Media




Source:
Adobe Systems Inc, ‘Adobe Mobile Experience Survey: What Users Want from Media, Finance, Travel and Shopping”
conducted by Keynote Systems, Oct 13, 2010, http://www.emarketer.com/Article.aspx?R=1008010

BH CONSULTING                             #devTO August 29, 2011                                                2
Mobile Browser vs App - Shopping




Source:
Adobe Systems Inc, ‘Adobe Mobile Experience Survey: What Users Want from Media, Finance, Travel and Shopping”
conducted by Keynote Systems, Oct 13, 2010, http://www.emarketer.com/Article.aspx?R=1008010

BH CONSULTING                             #devTO August 29, 2011                                                3
Web ‘App’




BH CONSULTING   #devTO August 29, 2011   4
Interface
                     Interface Type
                     <input type=“number” ... />
                     <input type=“email” ... />
                     <input type=“tel” ... />
                     <input type=“range” min=“1” max=“100”
                        step=“10” ... />
                     <input type=“url” ... />

                     Downgrades to “text” automatically



                     Placeholder Text
                     <input placeholder=“Enter name
                        here” ... />

                     No more javascript!

BH CONSULTING   #devTO August 29, 2011                       5
Meta and CSS Selectors
  Content Width
 <meta name=“viewport” content=“width=device-width” />

  Further Restrictions (not always a good idea)
 <meta name=“viewport” content=“width=device-width,initial-
    scale=1,user-scalable=no” />

  CSS
 <link rel=“stylesheet” href=“small-screen.css” type=“text/css”
    media=“only screen and (max-device-width: 480px)” />




 Source:
 http://www.sitepoint.com/iphone-development-12-tips/

BH CONSULTING                      #devTO August 29, 2011         6
Rotation




  Javascript
   window.onorientationchange = function() {
       // Orientation is in window.orientation
   }




BH CONSULTING            #devTO August 29, 2011   7
Geolocation
 !  Opt-in       location information
  // Get current location and pass to show_map
  navigator.geolocation.getCurrentPosition(show_map);

  function show_map(position) {
    var latitude = position.coords.latitude;
    var longitude = position.coords.longitude;
    // let's show a map or do something interesting!
  }




 Source:
 http://diveintohtml5.org/geolocation.html

BH CONSULTING                        #devTO August 29, 2011   8
Offline
 !  Key-value
            pairs
 !  Cache manifest
 !  Web SQL Database (Mobile)
  var foo = localStorage["bar"];
  // ...
  localStorage["bar"] = foo;

  openDatabase('documents', '1.0', 'Local document storage',
     5*1024*1024, function (db) {
    db.changeVersion('', '1.0', function (t) {
      t.executeSql('CREATE TABLE docids (id, name)');
    }, error);
  });
 Source:
 http://diveintohtml5.org/storage.html

BH CONSULTING                        #devTO August 29, 2011    9
HTML5 Video
   <video id="video" autobuffer height="240" width="360">
   <source src="BigBuck.m4v">
   <source src="BigBuck.webm" type="video/webm">
   <source src="BigBuck.theora.ogv" type="video/ogg">
   </video>

   <script language="text/javascript">
   var video = document.getElementById('video');
   video.addEventListener('click',function(){
     video.play();
   },false);
   </script>




 Source:
 http://stackoverflow.com/questions/1711078/html5-video-element-on-android

BH CONSULTING                      #devTO August 29, 2011                    10
Pros

 !  No need to submit updates and wait to be
    published or user to update
 !  Using a language you already know




BH CONSULTING      #devTO August 29, 2011      11
Cons

 !  Access  to native hardware (camera/mic,
    background notifications, concurrency)
 !  Offline support
 !  Waiting for standards




BH CONSULTING      #devTO August 29, 2011     12
Resources / Contact
 Clean, visual introduction to HTML5:
 http://diveintohtml5.org/introduction.html

 Full overview in all its browser-crashing glory:
 http://dev.w3.org/html5/spec/Overview.html

 Testing your browser:
 http://html5test.com/

 HTML5 vs Android:
 http://www.youtube.com/watch?v=4f2Zky_YyyQ

                         1-877-774-4767
                     brian@bhconsulting.ca
                           @brianhogg
                 bhconsulting.ca / brianhogg.com
BH CONSULTING             #devTO August 29, 2011    13

More Related Content

PDF
jQueryMobile Jump Start
PPTX
Jquery mobile
PPTX
jQuery Mobile
PDF
Accessibility - A feature you can build
KEY
yahoo.com/tablet
PPTX
Kevin MacDonald - Anyone can make maps
PPTX
Peter Newhook - Make Data Dance
PPT
Tyson Kingsbury - Anatomy of a Logo
jQueryMobile Jump Start
Jquery mobile
jQuery Mobile
Accessibility - A feature you can build
yahoo.com/tablet
Kevin MacDonald - Anyone can make maps
Peter Newhook - Make Data Dance
Tyson Kingsbury - Anatomy of a Logo

Viewers also liked (6)

PPTX
Marc Roginsky - How to Deliver Effective Client-facing Presentations
PDF
Shoukry Kattan - Titanium Mobile. Cross Platform Mobile Apps
PDF
Yuriy Blokhin - Building a Development Platform
PDF
Shey Sewani - RabbitMQ At FreshBooks
PDF
Farhan Thawar - Managing an Agile Team
PDF
Katherine Hague - The Decentralize Future of eCommerce
Marc Roginsky - How to Deliver Effective Client-facing Presentations
Shoukry Kattan - Titanium Mobile. Cross Platform Mobile Apps
Yuriy Blokhin - Building a Development Platform
Shey Sewani - RabbitMQ At FreshBooks
Farhan Thawar - Managing an Agile Team
Katherine Hague - The Decentralize Future of eCommerce
Ad

Similar to Brian Hogg - Web Apps using HTML5 and JS (20)

PPT
Intro to Web Apps using HTML5 and Javascript
PDF
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
PDF
Use Web Skills To Build Mobile Apps
PDF
Making your site mobile-friendly - DevCSI Reading 21.07.2010
PDF
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
PPT
Best Practices in Mobile Development: Building Your First jQuery Mobile App
PDF
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
PDF
Web Development for UX Designers
PPTX
The Rich Standard: Getting Familiar with HTML5
PDF
Introduction to HTML5
PDF
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
PPTX
Building appsinsilverlight4 part_1
PDF
Mat Marquis - JQuery Mobile
PDF
The Mobile Web Revealed For The Java Developer
PDF
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
PDF
Transmission2 25.11.2009
PDF
Bruce lawson-over-the-air
PPTX
HTML5 Introduction
PDF
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
KEY
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Intro to Web Apps using HTML5 and Javascript
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Use Web Skills To Build Mobile Apps
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Web Development for UX Designers
The Rich Standard: Getting Familiar with HTML5
Introduction to HTML5
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Building appsinsilverlight4 part_1
Mat Marquis - JQuery Mobile
The Mobile Web Revealed For The Java Developer
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
Transmission2 25.11.2009
Bruce lawson-over-the-air
HTML5 Introduction
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Ad

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Electronic commerce courselecture one. Pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Big Data Technologies - Introduction.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Electronic commerce courselecture one. Pdf
The AUB Centre for AI in Media Proposal.docx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
sap open course for s4hana steps from ECC to s4
Per capita expenditure prediction using model stacking based on satellite ima...
Unlocking AI with Model Context Protocol (MCP)
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
Big Data Technologies - Introduction.pptx
Network Security Unit 5.pdf for BCA BBA.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Brian Hogg - Web Apps using HTML5 and JS

  • 1. #devTO Web ‘apps’ using HTML5 and JS BH CONSULTING #devTO August 29, 2011
  • 2. Mobile Browser vs App - Media Source: Adobe Systems Inc, ‘Adobe Mobile Experience Survey: What Users Want from Media, Finance, Travel and Shopping” conducted by Keynote Systems, Oct 13, 2010, http://www.emarketer.com/Article.aspx?R=1008010 BH CONSULTING #devTO August 29, 2011 2
  • 3. Mobile Browser vs App - Shopping Source: Adobe Systems Inc, ‘Adobe Mobile Experience Survey: What Users Want from Media, Finance, Travel and Shopping” conducted by Keynote Systems, Oct 13, 2010, http://www.emarketer.com/Article.aspx?R=1008010 BH CONSULTING #devTO August 29, 2011 3
  • 4. Web ‘App’ BH CONSULTING #devTO August 29, 2011 4
  • 5. Interface Interface Type <input type=“number” ... /> <input type=“email” ... /> <input type=“tel” ... /> <input type=“range” min=“1” max=“100” step=“10” ... /> <input type=“url” ... /> Downgrades to “text” automatically Placeholder Text <input placeholder=“Enter name here” ... /> No more javascript! BH CONSULTING #devTO August 29, 2011 5
  • 6. Meta and CSS Selectors Content Width <meta name=“viewport” content=“width=device-width” /> Further Restrictions (not always a good idea) <meta name=“viewport” content=“width=device-width,initial- scale=1,user-scalable=no” /> CSS <link rel=“stylesheet” href=“small-screen.css” type=“text/css” media=“only screen and (max-device-width: 480px)” /> Source: http://www.sitepoint.com/iphone-development-12-tips/ BH CONSULTING #devTO August 29, 2011 6
  • 7. Rotation Javascript window.onorientationchange = function() { // Orientation is in window.orientation } BH CONSULTING #devTO August 29, 2011 7
  • 8. Geolocation !  Opt-in location information // Get current location and pass to show_map navigator.geolocation.getCurrentPosition(show_map); function show_map(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; // let's show a map or do something interesting! } Source: http://diveintohtml5.org/geolocation.html BH CONSULTING #devTO August 29, 2011 8
  • 9. Offline !  Key-value pairs !  Cache manifest !  Web SQL Database (Mobile) var foo = localStorage["bar"]; // ... localStorage["bar"] = foo; openDatabase('documents', '1.0', 'Local document storage', 5*1024*1024, function (db) { db.changeVersion('', '1.0', function (t) { t.executeSql('CREATE TABLE docids (id, name)'); }, error); }); Source: http://diveintohtml5.org/storage.html BH CONSULTING #devTO August 29, 2011 9
  • 10. HTML5 Video <video id="video" autobuffer height="240" width="360"> <source src="BigBuck.m4v"> <source src="BigBuck.webm" type="video/webm"> <source src="BigBuck.theora.ogv" type="video/ogg"> </video> <script language="text/javascript"> var video = document.getElementById('video'); video.addEventListener('click',function(){ video.play(); },false); </script> Source: http://stackoverflow.com/questions/1711078/html5-video-element-on-android BH CONSULTING #devTO August 29, 2011 10
  • 11. Pros !  No need to submit updates and wait to be published or user to update !  Using a language you already know BH CONSULTING #devTO August 29, 2011 11
  • 12. Cons !  Access to native hardware (camera/mic, background notifications, concurrency) !  Offline support !  Waiting for standards BH CONSULTING #devTO August 29, 2011 12
  • 13. Resources / Contact Clean, visual introduction to HTML5: http://diveintohtml5.org/introduction.html Full overview in all its browser-crashing glory: http://dev.w3.org/html5/spec/Overview.html Testing your browser: http://html5test.com/ HTML5 vs Android: http://www.youtube.com/watch?v=4f2Zky_YyyQ 1-877-774-4767 brian@bhconsulting.ca @brianhogg bhconsulting.ca / brianhogg.com BH CONSULTING #devTO August 29, 2011 13