SlideShare a Scribd company logo
The best UI platform yet…
The WWW platform
 W3C has been adding features to HTML
 Major browsers support the standards


   Latest version is HTML5
     Has all of the power of native applications
     Plus more!
Outline
   Introduction
   HTML5 for HCI
   Why choose HTML5?
   <canvas>
   WebGL
   Multi-touch
   Web SQL Database
   Web Sockets
   Better local file support
   Offline support
   Conclusion
Introduction
 Important to stay current in HCI
 Browsers will eventually replace other UI
  platforms
HTML5 for HCI
   <audio> and <video> tags

   <canvas> element

   SVG

   WebGL

   Touch API

Flash has been replaced
Why HTML5?
   HTML5 and javascript are interpreted
     No compilation
     Can test UI changes with a console window




               Firebug extension for Firefox
Why HTML5?
   Cross-platform
     Most browsers (read: not IE) conform to the
      W3C standards
     The same code works on PC, Mac, Linux
Why HTML5?
   Mobile device support
Why HTML5?
   No need for software updates
     Everyone sees the latest version


   Development can be done anywhere
     No need for special software
     Just a terminal and Firefox/Firebug
<canvas>
 Acts like a canvas
 Can draw on it using vector functions
     Lines
     Rectangles
     Paths
      ○ Arcs
      ○ Curves
<canvas>
   Or using raster functions
     Copy from HTML element
      ○ <img>
      ○ <video>
     Manipulate pixels directly
     Image processing
<canvas> example
<html>
          <head>
                   <script>
                   function a() {
                     var c = document.getElementById(„c‟);
                     var ctxt = c.getContext(„2d‟);
                     ctxt.arc(50, 50, // Center of circle (x, y)
                                    25, // Radius
                                    Math.PI / 2, // Start angle
                                    0, // End angle
                                    false // Counter-clockwise
                     );
                     ctxt.stroke();
                   }
                   </script>
          </head>
          <body onload=“a();”>
                  <canvas id=“c” height=“100” width=“200”></canvas>
          </body>
</html>
<canvas> example
WebGL
 Native 3D rendering in the browser
 Makes use of the same <canvas>
  element
 Syntax is like OpenGL


Lessons
Quake II
Multi-touch
   Gave this in last
    presentation, but here‟s
    a link to the tutorial

http://developer.apple.com/safari/library/documentation/appleapplications/reference/saf
ariwebcontent/handlingevents/handlingevents.html


   Works with iPad/iPhone/iPod and Windows
    7 with Chrome & Firefox
Web SQL Database
   Can store relational
    data locally in the
    browser
   Especially useful for
    offline apps (more
    later)
Web SQL Database
db = openDatabase(
      „testDB‟, // Name
      „1.0‟, // Version
      „Testing database‟, // User-friendly name
      1000000 // Maximum size (bytes)
);
db.transaction(function(tx) {
      tx.executeSql(„CREATE TABLE Foo (ID INT,
Name TEXT)‟);
      tx.executeSql(„INSERT INTO Foo (ID, Name)
Values(1, „bar‟);
});
Web SQL Database

db.transaction(function(tx) {
        tx.executeSql('SELECT * FROM Foo', [], function (tx, results) {
                var len = results.rows.length, i;
                for (i = 0; i < len; i++) {
                          var row = results.rows[i];
                          alert(row.ID + „ – „ + row.Name);
                }
        });
});
Web Sockets
   HTML now allows persistent
    connections with the server
   Real-time collaboration and
    updates
   Examples:
     Stock ticker
     Chat room
     White board


http://www.indicthreads.com/1525/building-real-
time-web-applications-using-html-5-web-sockets/
Working with Files
   Using Files in Web Applications
Offline support
HTML File

<html manifest=“offline.manifest”>…

Offline.manifest contents (must have MIME type of
text/cache-manifest)

CACHE MANIFEST
styles.css
jquery-1.4.min.js
offline.js
index.html
Detect online/offline events
// standard event listeners
window.addEventListener("online", function() { ... });
window.addEventListener("offline", function() { ... });
Recommendations
 Use Firefox with Firebug
 jQuery is a fantastic library!
 HTML5 can be used for iOS apps too!
     Ask for my last presentation slides
Conclusions
 Let the web browser developers do all
  the hard work
 Applications have never been more
  easy with HTML5
 Great features at a great price
 Develop without the need for bulky IDEs

More Related Content

PDF
handout-05b
PDF
Svelte JS introduction
PDF
JavaScript Web Workers
PDF
Let's migrate to Swift 3.0
PDF
Video WebChat Conference Tool
PPTX
webworkers
KEY
Getting Started with HTML 5 Web workers
PDF
Web workers
handout-05b
Svelte JS introduction
JavaScript Web Workers
Let's migrate to Swift 3.0
Video WebChat Conference Tool
webworkers
Getting Started with HTML 5 Web workers
Web workers

What's hot (19)

PPTX
Grails and Ajax
PDF
OpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and Mobile
ODP
Javascript frameworks: Backbone.js
PPTX
PPT
Real Time Event Dispatcher
PPT
Google Web Toolkits
PDF
The evolution of java script asynchronous calls
PDF
Integrating Angular js & three.js
PPTX
Vue.js + Django - configuración para desarrollo con webpack y HMR
PDF
JavaFX GUI architecture with Clojure core.async
PPTX
Django + Vue, JavaScript de 3ª generación para modernizar Django
KEY
Groovy Ecosystem - JFokus 2011 - Guillaume Laforge
PPTX
Backbone.js and friends
PPT
AngularJS and SPA
KEY
Knockout.js presentation
PDF
Workshop 12: AngularJS Parte I
PDF
Human Talks - StencilJS
PDF
Unity and WebSockets
PPTX
Workshop Intro: FrontEnd General Overview
Grails and Ajax
OpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and Mobile
Javascript frameworks: Backbone.js
Real Time Event Dispatcher
Google Web Toolkits
The evolution of java script asynchronous calls
Integrating Angular js & three.js
Vue.js + Django - configuración para desarrollo con webpack y HMR
JavaFX GUI architecture with Clojure core.async
Django + Vue, JavaScript de 3ª generación para modernizar Django
Groovy Ecosystem - JFokus 2011 - Guillaume Laforge
Backbone.js and friends
AngularJS and SPA
Knockout.js presentation
Workshop 12: AngularJS Parte I
Human Talks - StencilJS
Unity and WebSockets
Workshop Intro: FrontEnd General Overview
Ad

Viewers also liked (20)

PPT
Mobile Development: Social Media Experience
PDF
Seo cheat sheet_2-2013
PPT
4CNW discovery session for Business in North West Ireland
PDF
How to use Autoboss V30 Tool ?
PDF
Hybrid Solution to Portfolio Management
PDF
Подъёмные телескопические стойки Fenix. Каталог.
PPT
Daughters Without Dads Inc
PDF
Mc cormick mobilelearningcrashcourse_15.10.12
PPTX
How to Create an Effective PowerPoint
PDF
THE LAST 15 YEARS ON WALL STREET PART II
DOCX
FFFF
PPTX
03 17-15 panacea 15 03
PDF
Successful Investing in a Low Growth Economy: A Historical Perspective
PPT
Applying to b school in a few years - a few tips
PDF
Business Growth
PPT
Hrm10ech01
PDF
Guia cuatro luz
PPT
Shaping the role_of_hr_127
PPTX
Tips for maximizing your business school visits
PPTX
Posonous plants
Mobile Development: Social Media Experience
Seo cheat sheet_2-2013
4CNW discovery session for Business in North West Ireland
How to use Autoboss V30 Tool ?
Hybrid Solution to Portfolio Management
Подъёмные телескопические стойки Fenix. Каталог.
Daughters Without Dads Inc
Mc cormick mobilelearningcrashcourse_15.10.12
How to Create an Effective PowerPoint
THE LAST 15 YEARS ON WALL STREET PART II
FFFF
03 17-15 panacea 15 03
Successful Investing in a Low Growth Economy: A Historical Perspective
Applying to b school in a few years - a few tips
Business Growth
Hrm10ech01
Guia cuatro luz
Shaping the role_of_hr_127
Tips for maximizing your business school visits
Posonous plants
Ad

Similar to Html5 (20)

PDF
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
PDF
Google Web Toolkit
PPTX
2008 - TechDays PT: Building Software + Services with Volta
PDF
Speak the Web 15.02.2010
PPT
Google Web Toolkits
PPTX
KEY
Html5 For Jjugccc2009fall
PPT
Silverlight 2 for Developers - TechEd New Zealand 2008
PPT
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
PPT
ASP.NET AJAX with Visual Studio 2008
PDF
HTML5 Intoduction for Web Developers
PDF
webinale2011_Chris Mills_Brave new world of HTML5Html5
PDF
Brave new world of HTML5
PPT
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
PPTX
GWT = easy AJAX
PPTX
Electron - cross platform desktop applications made easy
PPTX
PDF
qooxdoo - Open Source Ajax Framework
PDF
Jsf2 html5-jazoon
PPTX
5 x HTML5 worth using in APEX (5)
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Google Web Toolkit
2008 - TechDays PT: Building Software + Services with Volta
Speak the Web 15.02.2010
Google Web Toolkits
Html5 For Jjugccc2009fall
Silverlight 2 for Developers - TechEd New Zealand 2008
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
ASP.NET AJAX with Visual Studio 2008
HTML5 Intoduction for Web Developers
webinale2011_Chris Mills_Brave new world of HTML5Html5
Brave new world of HTML5
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
GWT = easy AJAX
Electron - cross platform desktop applications made easy
qooxdoo - Open Source Ajax Framework
Jsf2 html5-jazoon
5 x HTML5 worth using in APEX (5)

Html5

  • 1. The best UI platform yet…
  • 2. The WWW platform  W3C has been adding features to HTML  Major browsers support the standards  Latest version is HTML5  Has all of the power of native applications  Plus more!
  • 3. Outline  Introduction  HTML5 for HCI  Why choose HTML5?  <canvas>  WebGL  Multi-touch  Web SQL Database  Web Sockets  Better local file support  Offline support  Conclusion
  • 4. Introduction  Important to stay current in HCI  Browsers will eventually replace other UI platforms
  • 5. HTML5 for HCI  <audio> and <video> tags  <canvas> element  SVG  WebGL  Touch API Flash has been replaced
  • 6. Why HTML5?  HTML5 and javascript are interpreted  No compilation  Can test UI changes with a console window Firebug extension for Firefox
  • 7. Why HTML5?  Cross-platform  Most browsers (read: not IE) conform to the W3C standards  The same code works on PC, Mac, Linux
  • 8. Why HTML5?  Mobile device support
  • 9. Why HTML5?  No need for software updates  Everyone sees the latest version  Development can be done anywhere  No need for special software  Just a terminal and Firefox/Firebug
  • 10. <canvas>  Acts like a canvas  Can draw on it using vector functions  Lines  Rectangles  Paths ○ Arcs ○ Curves
  • 11. <canvas>  Or using raster functions  Copy from HTML element ○ <img> ○ <video>  Manipulate pixels directly  Image processing
  • 12. <canvas> example <html> <head> <script> function a() { var c = document.getElementById(„c‟); var ctxt = c.getContext(„2d‟); ctxt.arc(50, 50, // Center of circle (x, y) 25, // Radius Math.PI / 2, // Start angle 0, // End angle false // Counter-clockwise ); ctxt.stroke(); } </script> </head> <body onload=“a();”> <canvas id=“c” height=“100” width=“200”></canvas> </body> </html>
  • 14. WebGL  Native 3D rendering in the browser  Makes use of the same <canvas> element  Syntax is like OpenGL Lessons Quake II
  • 15. Multi-touch  Gave this in last presentation, but here‟s a link to the tutorial http://developer.apple.com/safari/library/documentation/appleapplications/reference/saf ariwebcontent/handlingevents/handlingevents.html  Works with iPad/iPhone/iPod and Windows 7 with Chrome & Firefox
  • 16. Web SQL Database  Can store relational data locally in the browser  Especially useful for offline apps (more later)
  • 17. Web SQL Database db = openDatabase( „testDB‟, // Name „1.0‟, // Version „Testing database‟, // User-friendly name 1000000 // Maximum size (bytes) ); db.transaction(function(tx) { tx.executeSql(„CREATE TABLE Foo (ID INT, Name TEXT)‟); tx.executeSql(„INSERT INTO Foo (ID, Name) Values(1, „bar‟); });
  • 18. Web SQL Database db.transaction(function(tx) { tx.executeSql('SELECT * FROM Foo', [], function (tx, results) { var len = results.rows.length, i; for (i = 0; i < len; i++) { var row = results.rows[i]; alert(row.ID + „ – „ + row.Name); } }); });
  • 19. Web Sockets  HTML now allows persistent connections with the server  Real-time collaboration and updates  Examples:  Stock ticker  Chat room  White board http://www.indicthreads.com/1525/building-real- time-web-applications-using-html-5-web-sockets/
  • 20. Working with Files  Using Files in Web Applications
  • 21. Offline support HTML File <html manifest=“offline.manifest”>… Offline.manifest contents (must have MIME type of text/cache-manifest) CACHE MANIFEST styles.css jquery-1.4.min.js offline.js index.html
  • 22. Detect online/offline events // standard event listeners window.addEventListener("online", function() { ... }); window.addEventListener("offline", function() { ... });
  • 23. Recommendations  Use Firefox with Firebug  jQuery is a fantastic library!  HTML5 can be used for iOS apps too!  Ask for my last presentation slides
  • 24. Conclusions  Let the web browser developers do all the hard work  Applications have never been more easy with HTML5  Great features at a great price  Develop without the need for bulky IDEs