SlideShare une entreprise Scribd logo
1  sur  38
for
Rich User Experience

              phpXperts DevCon 2012
FLASHBACK..
WHAT IS   ?
A FLASH KILLER ?
HTML
             +
            JS
             +
           CSS

That’s all ?
Progress Meter
                                                               Web Storage
 Geo location
                                      Drag And Drop
             Semantics

     SPEECH INPUT                                                  Canvas 3D


                                                          Notifications
File / Hardware Access API

    Canvas
                                                        New Events
                             Form Controls
                                                          Web Socket
        History API                          Graphics
Graphics..

      Canvas
      WebGL
Things we can do with Canvas

Make Stunning Graph / Charts
Create 2D, 3D objects
Draw any Irregular shape
Image Processing
3D modeling
And many more…
Things we can do with Canvas
Graph Example




                http://www.humblesoftware.com/finance/index
Things we can do with Canvas
  Create 2D, 3D objects




                          http://alteredqualia.com/canvasmol/
Things we can do with Canvas
   Draw any Irregular shape




              http://hakim.se/experiments/html5/sketch/#4350e239
Things we can do with Canvas

        Image
    Processing




          http://people.opera.com/patrickl/experiments/canvas/image-edit/
Things we can do with Canvas
   3D Modeling




        http://www.giuseppesicari.it/progetti/javascript-3d-model-viewer/
WebGL
 The beast..
World flights visualization using WebGL




http://www.senchalabs.org/philogl/PhiloGL/examples/worldFlights2/
More WebGL Demos ?
http://www.chromeexperiments.com/
New Form Features
Email Field
Validation
                     Accomplishing all these will
Placeholder           require lot of plugins (e.g
                        jquery.validate plugin,
Required Attribute
                            overlabel etc)
Number Input

Date Picker
Range Input                & many more..
http://devfiles.myopera.com/articles/4582/html5-forms-example.html
History API

window.history.state
window.history.pushState(data, title [, url])
window.history.replaceState(data, title [, url])




Best Example : Github project files browser
History API (contd.)
Use Cases:

    File Browser

    E-commerce Product Viewer
    Single Page Mobile Application
Semantics
OLD SCHOOL              NEW
<div id=“header”>       <header> … </header>
</div>
                        <footer> … </footer>

                        <article> … </article>
<div id=“footer”>
</div>                  <hggroup>,<nav>,<aside>
                        <figure>,<time>,
                        <figcaption>
<div class=“article”>
</div>
Native Drag & Drop
Multimedia
Video Player




Audio Player
File / Hardware Access API
Camera & microphone access (no plugins)
<video autoplay controls></video>
<input type="button" value="?" onclick="record(this)" id="start">
<input type="button" value="?" onclick="stop(this)" id="stop"
disabled>
var localMediaStream, recorder;

var record = function(button) {
  recorder = mediaStream.recorder();
};

var stop = function(button) {
  mediaStream.stop();
  recorder.getRecordedData(function(blob) {
    // Upload blob using XHR2.
  });
};

window.navigator.getUserMedia('video', function(stream) {
  document.querySelector('video').src =
window.URL.createObjectURL(stream);
  localMediaStream = stream;
}, function(e) {
  console.log(e);
});
File / Hardware Access API
Drag in
document.querySelector('#dropzone').
  window.addEventListener('drop', function(e) {
    var reader = new FileReader();
    reader.onload = function(e) {
      document.querySelector('img').src = e.target.result;
    };
    reader.readAsDataURL(e.dataTransfer.files[0]);
}, false);


Example : Gmail Attachment Handler (see for yourself ;) )
File / Hardware Access API
Drag out ??
var files = document.querySelectorAll('.dragout');
for (var i = 0, file; file = files[i]; ++i) {
  file.addEventListener('dragstart', function(e) {
    e.dataTransfer.setData('DownloadURL',
this.dataset.downloadurl);
  }, false);
}


http://www.thecssninja.com/demo/gmail_dragout/
Notification API


window.notifications = window.notifications ||
    window.webkitNotifications || window.mozNotifications;

function showNotifications(pic, title, text) {
  if (notifications.checkPermission() == 0) {
    return;
  }

    var note = notifications.createNotification(pic, title, text);
    note.show();

    setTimeout(function(note) { // close note after a timeout
      note.cancel();
    }, 6000, notification);
}
Web Storage / Client Storage
                                                   * Moved to own spec




Earlier ..                     Now
• Cookies                      • Web Storage APIs: localStorage / sessionStorage
• Flash Storage                • Web SQL Database
• Internet Explorer UserData   • IndexedDB
• Google Gears                 • Application Cache
                               • File* APIs
Web Storage / Client Storage
Possible Use Cases

Shopping Cart

Notepad type Application (AutoSave Feature)

TODO Apps

Game Data
Web Sockets
             * Moved to own spec




AJAX Limitations




One Direction Communication
Web Sockets
             * Moved to own spec




With Web Sockets




Bidirectional Communication
Web Sockets
                * Moved to own spec




Best Use Cases
Chat / Live Help Application

Live Streaming API (e.g twitter updates)

Multiplayer Games

Game Data

Collaborative Apps (e.g Google Spreadsheet)

Stock ticker
Geo Location API
                   * Moved to own spec


Identify User’s Location




>> Serve location based content
In Short

HTML5 minimizes dependency (plugins, libraries)

Makes the user experience smoother

Allows to build more scalable apps
Aah, snap!

          did we forget the Mobile Thing ??



               Good News!

Both iPhone and Android have Webkit based Browser
                who support HTML5
Some HTML5 Resources
http://www.html5rocks.com/
Update about all the HTML features, slides etc

http://html5-demos.appspot.com/
Demos, presentations ..

http:// modernizr.com
Detect feature availability of HTML5 in browsers

http://dev.opera.com/articles/tags/html5
Lot of articles related to HTML5 features

http://html5doctor.com/
Articles about HTML5 elements and their usage

http://caniuse.com/
HTML5/CSS/SVG Compatibility in Browsers chart


http://html5readiness.com/
HTML5/CSS3 Readiness for browsers in a rainbow chart
QUESTIONS ?

Contenu connexe

Tendances

The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17GreeceJS
 
JavaScript UI Architecture: Be all that you can be
JavaScript UI Architecture: Be all that you can beJavaScript UI Architecture: Be all that you can be
JavaScript UI Architecture: Be all that you can beKyle Simpson
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWebDave Bouwman
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTimothy Oxley
 
Effective TDD - Less is more
Effective TDD - Less is moreEffective TDD - Less is more
Effective TDD - Less is moreBen Lau
 
Polymer and web component
Polymer and web componentPolymer and web component
Polymer and web componentImam Raza
 
Polymer
Polymer Polymer
Polymer jskvara
 
How to build a web application with Polymer
How to build a web application with PolymerHow to build a web application with Polymer
How to build a web application with PolymerSami Suo-Heikki
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web ComponentsFu Cheng
 
Polymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill LibraryPolymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill Librarynaohito maeda
 
Goodbye JavaScript Hello Blazor
Goodbye JavaScript Hello BlazorGoodbye JavaScript Hello Blazor
Goodbye JavaScript Hello BlazorEd Charbeneau
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentRandy Connolly
 
Google Polymer Introduction
Google Polymer IntroductionGoogle Polymer Introduction
Google Polymer IntroductionDavid Price
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Springsdeeg
 
Building modern share point apps (angularjs, npm, bower, grunt, VS2015)
Building modern share point apps (angularjs, npm, bower, grunt, VS2015)Building modern share point apps (angularjs, npm, bower, grunt, VS2015)
Building modern share point apps (angularjs, npm, bower, grunt, VS2015)Sergei Sergeev
 
Web Components
Web ComponentsWeb Components
Web ComponentsFITC
 

Tendances (20)

Introduction to polymer project
Introduction to polymer projectIntroduction to polymer project
Introduction to polymer project
 
Visual resume
Visual resumeVisual resume
Visual resume
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
 
JavaScript UI Architecture: Be all that you can be
JavaScript UI Architecture: Be all that you can beJavaScript UI Architecture: Be all that you can be
JavaScript UI Architecture: Be all that you can be
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWeb
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascript
 
Effective TDD - Less is more
Effective TDD - Less is moreEffective TDD - Less is more
Effective TDD - Less is more
 
Google Polymer Framework
Google Polymer FrameworkGoogle Polymer Framework
Google Polymer Framework
 
Polymer and web component
Polymer and web componentPolymer and web component
Polymer and web component
 
Polymer
Polymer Polymer
Polymer
 
How to build a web application with Polymer
How to build a web application with PolymerHow to build a web application with Polymer
How to build a web application with Polymer
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
Polymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill LibraryPolymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill Library
 
Goodbye JavaScript Hello Blazor
Goodbye JavaScript Hello BlazorGoodbye JavaScript Hello Blazor
Goodbye JavaScript Hello Blazor
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
 
Google Polymer Introduction
Google Polymer IntroductionGoogle Polymer Introduction
Google Polymer Introduction
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Spring
 
GWT
GWTGWT
GWT
 
Building modern share point apps (angularjs, npm, bower, grunt, VS2015)
Building modern share point apps (angularjs, npm, bower, grunt, VS2015)Building modern share point apps (angularjs, npm, bower, grunt, VS2015)
Building modern share point apps (angularjs, npm, bower, grunt, VS2015)
 
Web Components
Web ComponentsWeb Components
Web Components
 

Similaire à Rich User Experience with HTML5 Canvas and WebGL

HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on MobileAdam Lu
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - MozillaRobert Nyman
 
Bd conf sencha touch workshop
Bd conf sencha touch workshopBd conf sencha touch workshop
Bd conf sencha touch workshopJames Pearce
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5dynamis
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsIvano Malavolta
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるSadaaki HIRAI
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Sadaaki HIRAI
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshellLennart Schoors
 
Repaso rápido a los nuevos estándares web
Repaso rápido a los nuevos estándares webRepaso rápido a los nuevos estándares web
Repaso rápido a los nuevos estándares webPablo Garaizar
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009Christopher Judd
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web DevelopmentRobert J. Stein
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Startedguest1af57e
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1James Pearce
 
A Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionA Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionJames Pearce
 
HTML5 and Beyond
HTML5 and BeyondHTML5 and Beyond
HTML5 and Beyonddynamis
 

Similaire à Rich User Experience with HTML5 Canvas and WebGL (20)

Html5
Html5Html5
Html5
 
HTML5 WebWorks
HTML5 WebWorksHTML5 WebWorks
HTML5 WebWorks
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
Web app and more
Web app and moreWeb app and more
Web app and more
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
 
Bd conf sencha touch workshop
Bd conf sencha touch workshopBd conf sencha touch workshop
Bd conf sencha touch workshop
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
 
Repaso rápido a los nuevos estándares web
Repaso rápido a los nuevos estándares webRepaso rápido a los nuevos estándares web
Repaso rápido a los nuevos estándares web
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
A Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionA Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 Revolution
 
HTML5 and Beyond
HTML5 and BeyondHTML5 and Beyond
HTML5 and Beyond
 

Dernier

unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Dernier (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Rich User Experience with HTML5 Canvas and WebGL

  • 1. for Rich User Experience phpXperts DevCon 2012
  • 2.
  • 6. HTML + JS + CSS That’s all ?
  • 7. Progress Meter Web Storage Geo location Drag And Drop Semantics SPEECH INPUT Canvas 3D Notifications File / Hardware Access API Canvas New Events Form Controls Web Socket History API Graphics
  • 8. Graphics.. Canvas WebGL
  • 9. Things we can do with Canvas Make Stunning Graph / Charts Create 2D, 3D objects Draw any Irregular shape Image Processing 3D modeling And many more…
  • 10. Things we can do with Canvas Graph Example http://www.humblesoftware.com/finance/index
  • 11. Things we can do with Canvas Create 2D, 3D objects http://alteredqualia.com/canvasmol/
  • 12. Things we can do with Canvas Draw any Irregular shape http://hakim.se/experiments/html5/sketch/#4350e239
  • 13. Things we can do with Canvas Image Processing http://people.opera.com/patrickl/experiments/canvas/image-edit/
  • 14. Things we can do with Canvas 3D Modeling http://www.giuseppesicari.it/progetti/javascript-3d-model-viewer/
  • 16. World flights visualization using WebGL http://www.senchalabs.org/philogl/PhiloGL/examples/worldFlights2/
  • 17. More WebGL Demos ? http://www.chromeexperiments.com/
  • 18. New Form Features Email Field Validation Accomplishing all these will Placeholder require lot of plugins (e.g jquery.validate plugin, Required Attribute overlabel etc) Number Input Date Picker Range Input & many more..
  • 20. History API window.history.state window.history.pushState(data, title [, url]) window.history.replaceState(data, title [, url]) Best Example : Github project files browser
  • 21. History API (contd.) Use Cases: File Browser E-commerce Product Viewer Single Page Mobile Application
  • 22. Semantics OLD SCHOOL NEW <div id=“header”> <header> … </header> </div> <footer> … </footer> <article> … </article> <div id=“footer”> </div> <hggroup>,<nav>,<aside> <figure>,<time>, <figcaption> <div class=“article”> </div>
  • 25. File / Hardware Access API Camera & microphone access (no plugins) <video autoplay controls></video> <input type="button" value="?" onclick="record(this)" id="start"> <input type="button" value="?" onclick="stop(this)" id="stop" disabled> var localMediaStream, recorder; var record = function(button) { recorder = mediaStream.recorder(); }; var stop = function(button) { mediaStream.stop(); recorder.getRecordedData(function(blob) { // Upload blob using XHR2. }); }; window.navigator.getUserMedia('video', function(stream) { document.querySelector('video').src = window.URL.createObjectURL(stream); localMediaStream = stream; }, function(e) { console.log(e); });
  • 26. File / Hardware Access API Drag in document.querySelector('#dropzone'). window.addEventListener('drop', function(e) { var reader = new FileReader(); reader.onload = function(e) { document.querySelector('img').src = e.target.result; }; reader.readAsDataURL(e.dataTransfer.files[0]); }, false); Example : Gmail Attachment Handler (see for yourself ;) )
  • 27. File / Hardware Access API Drag out ?? var files = document.querySelectorAll('.dragout'); for (var i = 0, file; file = files[i]; ++i) { file.addEventListener('dragstart', function(e) { e.dataTransfer.setData('DownloadURL', this.dataset.downloadurl); }, false); } http://www.thecssninja.com/demo/gmail_dragout/
  • 28. Notification API window.notifications = window.notifications || window.webkitNotifications || window.mozNotifications; function showNotifications(pic, title, text) { if (notifications.checkPermission() == 0) { return; } var note = notifications.createNotification(pic, title, text); note.show(); setTimeout(function(note) { // close note after a timeout note.cancel(); }, 6000, notification); }
  • 29. Web Storage / Client Storage * Moved to own spec Earlier .. Now • Cookies • Web Storage APIs: localStorage / sessionStorage • Flash Storage • Web SQL Database • Internet Explorer UserData • IndexedDB • Google Gears • Application Cache • File* APIs
  • 30. Web Storage / Client Storage Possible Use Cases Shopping Cart Notepad type Application (AutoSave Feature) TODO Apps Game Data
  • 31. Web Sockets * Moved to own spec AJAX Limitations One Direction Communication
  • 32. Web Sockets * Moved to own spec With Web Sockets Bidirectional Communication
  • 33. Web Sockets * Moved to own spec Best Use Cases Chat / Live Help Application Live Streaming API (e.g twitter updates) Multiplayer Games Game Data Collaborative Apps (e.g Google Spreadsheet) Stock ticker
  • 34. Geo Location API * Moved to own spec Identify User’s Location >> Serve location based content
  • 35. In Short HTML5 minimizes dependency (plugins, libraries) Makes the user experience smoother Allows to build more scalable apps
  • 36. Aah, snap! did we forget the Mobile Thing ?? Good News! Both iPhone and Android have Webkit based Browser who support HTML5
  • 37. Some HTML5 Resources http://www.html5rocks.com/ Update about all the HTML features, slides etc http://html5-demos.appspot.com/ Demos, presentations .. http:// modernizr.com Detect feature availability of HTML5 in browsers http://dev.opera.com/articles/tags/html5 Lot of articles related to HTML5 features http://html5doctor.com/ Articles about HTML5 elements and their usage http://caniuse.com/ HTML5/CSS/SVG Compatibility in Browsers chart http://html5readiness.com/ HTML5/CSS3 Readiness for browsers in a rainbow chart