SlideShare a Scribd company logo
1 of 13
Download to read offline
#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

Viewers also liked

Viewers also liked (6)

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

Similar to Brian Hogg - Web Apps using HTML5 and JS

Intro to Web Apps using HTML5 and Javascript
Intro to Web Apps using HTML5 and JavascriptIntro to Web Apps using HTML5 and Javascript
Intro to Web Apps using HTML5 and Javascript
Brian Hogg
 
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Patrick Lauke
 
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Patrick Lauke
 
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Patrick Lauke
 
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
Patrick Lauke
 
Transmission2 25.11.2009
Transmission2 25.11.2009Transmission2 25.11.2009
Transmission2 25.11.2009
Patrick Lauke
 
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Patrick Lauke
 

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

Intro to Web Apps using HTML5 and Javascript
Intro to Web Apps using HTML5 and JavascriptIntro to Web Apps using HTML5 and Javascript
Intro to Web Apps using HTML5 and Javascript
 
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
 
Use Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile AppsUse Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile Apps
 
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010
 
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
 
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppBest Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile App
 
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
 
Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1
 
Mat Marquis - JQuery Mobile
Mat Marquis - JQuery MobileMat Marquis - JQuery Mobile
Mat Marquis - JQuery Mobile
 
The Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java DeveloperThe Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java Developer
 
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
 
Transmission2 25.11.2009
Transmission2 25.11.2009Transmission2 25.11.2009
Transmission2 25.11.2009
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-air
 
HTML5 Introduction
HTML5 IntroductionHTML5 Introduction
HTML5 Introduction
 
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
 
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
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 

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