SlideShare a Scribd company logo
TOUCH ME.
I DAREYOU…
Josh Holmes
@joshholmes
http://www.joshholmes.com
josh.holmes@microsoft.com
Why does touch matter?
Touch me, I Dare You...
What’s your strategy for dealing with
touch?
Ignore
Retrofit
Design
for first
Remember touch is touching…
Don’t
Use
It
Hover Sucks
Obviously…
Touch Sized Buttons
~42px
Touch and the Grid
Ergonomics & touch
Touch the hotspots
Design forTouch First
• Design with hands and fingers in mind
Remember there’s more than one finger
Remember there’s more than type of input
Touch me, I Dare You...
Touch me, I Dare You...
W3C Pointer Standard
• http://www.w3.org/Submission/pointer-events/
• http://www.w3.org/TR/pointerevents/
 pointerMove
 pointerUp
 pointerOver
 pointerOut
W3C Pointer Standard
• http://www.w3.org/Submission/pointer-events/
• http://www.w3.org/TR/pointerevents/
 pointermove
 pointerup
 pointerover
 pointerout
Event Models
But not
as a
crutch!
 pointermove
 pointerup
 pointerover
 pointerout
 pointercancel
demo
Event Models
Code for multi-touch
document.addEventListener(moveevent, moveTouchPoint, false);
…
function moveTouchPoint(e) {
var pID = e.pointerId || 0;
if (e.targetTouches) {
for (var i = 0; i < event.targetTouches.length; i++) {
iPD = e.targetTouches[i].identifier;
if (touchPoints[pID]) {
touchPoints[pID].x = e.targetTouches[i].clientX;
touchPoints[pID].y = e.targetTouches[i].clientY;
}
}
} else {
if (touchPoints[pID]) {
touchPoints[pID].x = e.clientX;
touchPoints[pID].y = e.clientY;
}
} }
Code for Pointer
document.addEventListener(moveevent,
moveTouchPoint, false);
…
function moveTouchPoint(e) {
var pID = e.pointerId;
if (touchPoints[pID]) {
touchPoints[pID].x = e.clientX;
touchPoints[pID].y = e.clientY;
}
}
CurrentTouch support on IOS/Android…
if ('ontouchstart' in document.documentElement) {
myButton.addEventListener('touchstart', myFavFunction, false);
}
else {
myButton.addEventListener('click', myFavFunction, false);
}
Touch First
if (window.ontouchstart) {
myButton.addEventListener('touchstart', myFavFunction, false);
}
else {
myButton.addEventListener('click', myFavFunction, false);
}
if (window.navigator.msPointerEnabled) {
myButton.addEventListener('MSPointerDown', myFavFunction, false);
} else if ('ontouchstart' in document.documentElement) {
myButton.addEventListener('touchstart', myFavFunction, false);
}
else {
myButton.addEventListener('click', myFavFunction, false);
}
Polyfills…
• Hand.js - http://handjs.codeplex.com
• Polymer PointerEvents - http://github.com/polymer-project/PointerEvents
• Points.js - http://github.com/Rich-Harris/Points
demo
Touch me, I Dare You...
Scroll Snap
-ms-scroll-snap-type: mandatory;
-ms-scroll-snap-points-x: snapInterval(0px, 405px);
Content Zooming
-ms-content-zooming: zoom;
Touch me, I Dare You...
demo
What are LiveTiles?
<meta name="application-name" content="Josh Holmes"/>
<meta name="msapplication-TileColor" content="#f2a109"/>
<meta name="msapplication-square70x70logo" content="tiny.png"/>
<meta name="msapplication-square150x150logo" content="square.png"/>
<meta name="msapplication-wide310x150logo" content="wide.jpg"/>
<meta name="msapplication-square310x310logo" content="large.jpg"/>
<meta name="msapplication-notification" content="frequency=30;polling-
uri=http://foo.com/f&amp;id=1;polling-uri2=http://foo.com/f&amp;id=2;polling-
uri3=http://foo.com/f&amp;id=3;polling-uri4=http://foo.com/f&amp;id=4;polling-
uri5=http://foo.com/f&amp;id=5; cycle=1"/>
What’s the Feed Look Like?
<?xml version="1.0"?>
<tile>
<visual lang="en-US" version="2">
<binding fallback="TileSquareImage" branding="logo" template="TileSquare150x150Text04">
<text id="1">.NET Rocks Ireland</text>
</binding>
<binding fallback="TileWideImage" branding="logo" template="TileWide310x150ImageAndText01">
<image id="1" src="http://www.dotnetrocks.com/slices/carlrichard2.jpg"/>
<text id="1">.NET Rocks Ireland</text>
</binding>
<binding branding="logo" template="TileSquare310x310TextList02"
contentId="http://www.joshholmes.com/blog/?p=77168529">
<text id="1">.NET Rocks Ireland</text>
<text id="2">Freddy moment</text>
<text id="3">Tech Parenting</text>
</binding>
</visual>
</tile>
demo
Touch me, I Dare You...
What’s needed for Swipe Ahead?
<link rel="next" href="http://www.joshholmes.com/blog/page/2/" />
demo
Where’s IE11 now?
• Dev preview
• Win 8.1
• Windows 7 – Rease Preview
• New features
• F12 DevTools (like you just saw)
• UA string change
Site compatibility just works
• WebGL is awesome
• Evergreen updates
• More standards
• MoreGPU
• More awesomesauce
Touch me, I Dare You...
Wrapup
•http://modern.ie
•http://docs.webplatform.org/PointerEvents
•http://joshholmes.com
•@joshholmes
•josh.holmes@microsoft.com
TOUCH ME.
I DAREYOU…
Josh Holmes
@joshholmes
http://www.joshholmes.com
josh.holmes@microsoft.com

More Related Content

PPT
YUI for your Hacks-IITB
PDF
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
PDF
YUI introduction to build hack interfaces
PDF
Professional web development with libraries
PPTX
F as in failure slideshare
PPTX
Microsoft and PHP at CakeFest 2010
PPTX
Microsoft/Zend Webcast on Cloud Computing
PPT
32 Ways To Keep Your Blog From Sucking
YUI for your Hacks-IITB
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
YUI introduction to build hack interfaces
Professional web development with libraries
F as in failure slideshare
Microsoft and PHP at CakeFest 2010
Microsoft/Zend Webcast on Cloud Computing
32 Ways To Keep Your Blog From Sucking

Viewers also liked (7)

PPTX
Scaling Big While Sleeping Well
PPT
Architecting RIAs with Silverlight
PPTX
So you want to be an architect
PPTX
BrazilJS Perf Doctor Talk
PPTX
Cloud becomingreality
PPTX
Mentorship by Josh Holmes - a KalamazooX talk
PPTX
Wordpress on Windows
Scaling Big While Sleeping Well
Architecting RIAs with Silverlight
So you want to be an architect
BrazilJS Perf Doctor Talk
Cloud becomingreality
Mentorship by Josh Holmes - a KalamazooX talk
Wordpress on Windows
Ad

Similar to Touch me, I Dare You... (20)

PPTX
Fast multi touch enabled web sites
PPTX
Tips for building fast multi touch enabled web sites
PDF
T3con10_html5_kosack_zinner
PPTX
Getting Touchy Feely with the Web
PDF
Getting touchy - an introduction to touch and pointer events / TPAC 2016 / Li...
PPTX
Touch the web
KEY
Creating Responsive HTML5 Touch Interfaces
PDF
Getting touchy - an introduction to touch events / Sud Web / Avignon 17.05.2013
PDF
Getting touchy - an introduction to touch and pointer events / Web Rebels / O...
PDF
Patrick H. Lauke - Getting Touchy; an introduction to touch and pointer events
PDF
Getting touchy - an introduction to touch events / Webinale / Berlin 04.06.2013
PDF
Getting touchy - an introduction to touch and pointer events / Frontend NE / ...
PDF
The touch events
PDF
Getting touchy - an introduction to touch and pointer events / Future of Web ...
PPTX
Getting Web Multi-Touch Working
PDF
Getting touchy - an introduction to touch events / Sainté Mobile Days / Saint...
PDF
Responsive Web Design and touch devices
PDF
Getting touchy - an introduction to touch and pointer events (1 day workshop)...
PDF
Sperimentazioni lezione6 from_designtoapplication copy
PPTX
Mobile Web on Touch Event and YUI
Fast multi touch enabled web sites
Tips for building fast multi touch enabled web sites
T3con10_html5_kosack_zinner
Getting Touchy Feely with the Web
Getting touchy - an introduction to touch and pointer events / TPAC 2016 / Li...
Touch the web
Creating Responsive HTML5 Touch Interfaces
Getting touchy - an introduction to touch events / Sud Web / Avignon 17.05.2013
Getting touchy - an introduction to touch and pointer events / Web Rebels / O...
Patrick H. Lauke - Getting Touchy; an introduction to touch and pointer events
Getting touchy - an introduction to touch events / Webinale / Berlin 04.06.2013
Getting touchy - an introduction to touch and pointer events / Frontend NE / ...
The touch events
Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting Web Multi-Touch Working
Getting touchy - an introduction to touch events / Sainté Mobile Days / Saint...
Responsive Web Design and touch devices
Getting touchy - an introduction to touch and pointer events (1 day workshop)...
Sperimentazioni lezione6 from_designtoapplication copy
Mobile Web on Touch Event and YUI
Ad

More from Josh Holmes (14)

PPTX
Tips from a grizzled speaker
PPTX
Is that a Rich Web in Your Pocket?
PPTX
Cloud by Numbers
PPTX
Rev it up with php on windows
PPTX
Microsoft Zend webcast on Azure
PPTX
Scaling WordPress on Microsoft
PPTX
MODx on Windows
PPT
Wordpress On Windows
PPTX
Moving Enterprise Applications To The Cloud
PPT
Best And Worst Practices Building Ria with Adobe and Microsoft
PPTX
The Lost Art of Simplicity
PPT
Architecture of RIA from JAOO
PPT
Best And Worst Ria
PPT
Architecting For Ux
Tips from a grizzled speaker
Is that a Rich Web in Your Pocket?
Cloud by Numbers
Rev it up with php on windows
Microsoft Zend webcast on Azure
Scaling WordPress on Microsoft
MODx on Windows
Wordpress On Windows
Moving Enterprise Applications To The Cloud
Best And Worst Practices Building Ria with Adobe and Microsoft
The Lost Art of Simplicity
Architecture of RIA from JAOO
Best And Worst Ria
Architecting For Ux

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Approach and Philosophy of On baking technology
PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
Approach and Philosophy of On baking technology
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
“AI and Expert System Decision Support & Business Intelligence Systems”
Reach Out and Touch Someone: Haptics and Empathic Computing
Review of recent advances in non-invasive hemoglobin estimation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...

Touch me, I Dare You...

  • 1. TOUCH ME. I DAREYOU… Josh Holmes @joshholmes http://www.joshholmes.com josh.holmes@microsoft.com
  • 2. Why does touch matter?
  • 4. What’s your strategy for dealing with touch? Ignore Retrofit Design for first
  • 5. Remember touch is touching… Don’t Use It Hover Sucks
  • 10. Design forTouch First • Design with hands and fingers in mind
  • 11. Remember there’s more than one finger
  • 12. Remember there’s more than type of input
  • 15. W3C Pointer Standard • http://www.w3.org/Submission/pointer-events/ • http://www.w3.org/TR/pointerevents/  pointerMove  pointerUp  pointerOver  pointerOut
  • 16. W3C Pointer Standard • http://www.w3.org/Submission/pointer-events/ • http://www.w3.org/TR/pointerevents/  pointermove  pointerup  pointerover  pointerout
  • 17. Event Models But not as a crutch!  pointermove  pointerup  pointerover  pointerout  pointercancel
  • 18. demo
  • 20. Code for multi-touch document.addEventListener(moveevent, moveTouchPoint, false); … function moveTouchPoint(e) { var pID = e.pointerId || 0; if (e.targetTouches) { for (var i = 0; i < event.targetTouches.length; i++) { iPD = e.targetTouches[i].identifier; if (touchPoints[pID]) { touchPoints[pID].x = e.targetTouches[i].clientX; touchPoints[pID].y = e.targetTouches[i].clientY; } } } else { if (touchPoints[pID]) { touchPoints[pID].x = e.clientX; touchPoints[pID].y = e.clientY; } } }
  • 21. Code for Pointer document.addEventListener(moveevent, moveTouchPoint, false); … function moveTouchPoint(e) { var pID = e.pointerId; if (touchPoints[pID]) { touchPoints[pID].x = e.clientX; touchPoints[pID].y = e.clientY; } }
  • 22. CurrentTouch support on IOS/Android… if ('ontouchstart' in document.documentElement) { myButton.addEventListener('touchstart', myFavFunction, false); } else { myButton.addEventListener('click', myFavFunction, false); }
  • 23. Touch First if (window.ontouchstart) { myButton.addEventListener('touchstart', myFavFunction, false); } else { myButton.addEventListener('click', myFavFunction, false); } if (window.navigator.msPointerEnabled) { myButton.addEventListener('MSPointerDown', myFavFunction, false); } else if ('ontouchstart' in document.documentElement) { myButton.addEventListener('touchstart', myFavFunction, false); } else { myButton.addEventListener('click', myFavFunction, false); }
  • 24. Polyfills… • Hand.js - http://handjs.codeplex.com • Polymer PointerEvents - http://github.com/polymer-project/PointerEvents • Points.js - http://github.com/Rich-Harris/Points
  • 25. demo
  • 30. demo
  • 31. What are LiveTiles? <meta name="application-name" content="Josh Holmes"/> <meta name="msapplication-TileColor" content="#f2a109"/> <meta name="msapplication-square70x70logo" content="tiny.png"/> <meta name="msapplication-square150x150logo" content="square.png"/> <meta name="msapplication-wide310x150logo" content="wide.jpg"/> <meta name="msapplication-square310x310logo" content="large.jpg"/> <meta name="msapplication-notification" content="frequency=30;polling- uri=http://foo.com/f&amp;id=1;polling-uri2=http://foo.com/f&amp;id=2;polling- uri3=http://foo.com/f&amp;id=3;polling-uri4=http://foo.com/f&amp;id=4;polling- uri5=http://foo.com/f&amp;id=5; cycle=1"/>
  • 32. What’s the Feed Look Like? <?xml version="1.0"?> <tile> <visual lang="en-US" version="2"> <binding fallback="TileSquareImage" branding="logo" template="TileSquare150x150Text04"> <text id="1">.NET Rocks Ireland</text> </binding> <binding fallback="TileWideImage" branding="logo" template="TileWide310x150ImageAndText01"> <image id="1" src="http://www.dotnetrocks.com/slices/carlrichard2.jpg"/> <text id="1">.NET Rocks Ireland</text> </binding> <binding branding="logo" template="TileSquare310x310TextList02" contentId="http://www.joshholmes.com/blog/?p=77168529"> <text id="1">.NET Rocks Ireland</text> <text id="2">Freddy moment</text> <text id="3">Tech Parenting</text> </binding> </visual> </tile>
  • 33. demo
  • 35. What’s needed for Swipe Ahead? <link rel="next" href="http://www.joshholmes.com/blog/page/2/" />
  • 36. demo
  • 37. Where’s IE11 now? • Dev preview • Win 8.1 • Windows 7 – Rease Preview • New features • F12 DevTools (like you just saw) • UA string change Site compatibility just works • WebGL is awesome • Evergreen updates • More standards • MoreGPU • More awesomesauce
  • 40. TOUCH ME. I DAREYOU… Josh Holmes @joshholmes http://www.joshholmes.com josh.holmes@microsoft.com

Editor's Notes

  • #11: RE: Actions should be reversible so users can safely explore. Example – swipe to select is reversible
  • #16: We’ve now submitted pointers as a standard specification to the W3C
  • #17: We’ve now submitted pointers as a standard specification to the W3C
  • #18: New Pointer Model proposed by MS with ie10 and windows 8 appLook for
  • #19: Show how easy to program for independent multi-touch: http://touch2.azurewebsites.net/water3.html
  • #20: Similar object formation to traditional event object, all same values in pointer event object but with moreProvides additional information
  • #21: Each touch point for iOS is buried in a collection, so we have to add an extra loop on each frame to identify each touch point and then position in tracking array
  • #22: Model in this case needs to know that current and previous locations of each touch point, so tracks in form of array based on pointerID
  • #24: So now lets upgrade our feature detection to consider pointers as well
  • #25: Show using two different input types at once: http://ie.microsoft.com/testdrive/Performance/BrickBreaker/
  • #31: http://touch2.azurewebsites.net/cssCarousel.htmlhttp://touch2.azurewebsites.net/cssZoom.html(can this be shown publicly? ) http://t.msn.com/
  • #32: http://touch2.azurewebsites.net/cssCarousel.htmlhttp://touch2.azurewebsites.net/cssZoom.html(can this be shown publicly? ) http://t.msn.com/
  • #36: http://touch2.azurewebsites.net/cssCarousel.htmlhttp://touch2.azurewebsites.net/cssZoom.html(can this be shown publicly? ) http://t.msn.com/