Progressive Prototyping w/HTML5, CSS3 and jQuery

44
PROTOTYPING with TODD ZAKI WARFEL / UX LISBON /#HTML5

description

Slides from my progressive prototyping with HTML5, CSS3 and jQuery workshop.

Transcript of Progressive Prototyping w/HTML5, CSS3 and jQuery

Page 1: Progressive Prototyping w/HTML5, CSS3 and jQuery

PROTOTYPING with

TODD ZAKI WARFEL / UXLISBON /#HTML5

Page 2: Progressive Prototyping w/HTML5, CSS3 and jQuery

http://bit.ly/HTML5_prototype

Grab the files

Page 3: Progressive Prototyping w/HTML5, CSS3 and jQuery

Set ExpectationsGuiding Principles

Page 4: Progressive Prototyping w/HTML5, CSS3 and jQuery

The Best Tool is the one you knowGuiding Principles

Page 5: Progressive Prototyping w/HTML5, CSS3 and jQuery

Prototype Only What you NeedGuiding Principles

Page 6: Progressive Prototyping w/HTML5, CSS3 and jQuery

Pros and ConsHTMl as a prototyping tool

Page 7: Progressive Prototyping w/HTML5, CSS3 and jQuery

Production vs. Non-productionAbout that code thing

Page 8: Progressive Prototyping w/HTML5, CSS3 and jQuery

html vs. html5

Page 9: Progressive Prototyping w/HTML5, CSS3 and jQuery

HTML Doctypes<!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  XHTML  1.1//EN"

  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  XHTML  1.0  Strict//EN"

  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐strict.dtd">

<!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  HTML  4.01  Transitional//EN"

     "http://www.w3.org/TR/html4/loose.dtd">

<!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  XHTML  1.0  Frameset//EN"

  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐frameset.dtd">

<!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  HTML  4.01  Strict//EN"

     "http://www.w3.org/TR/html4/strict.dtd">

<!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  HTML  4.01  Transitional//EN"

     "http://www.w3.org/TR/html4/loose.dtd">

Page 10: Progressive Prototyping w/HTML5, CSS3 and jQuery

HTML5 Doctypes<!DOCTYPE  HTML>

Page 11: Progressive Prototyping w/HTML5, CSS3 and jQuery

HTML Tags<div>

<p>

<dl>,  <dt>,  <dd>

<ol>,  <ul>,  <li>

<fieldset>

<input>

<article>

<aside>

<section>

<header>,  <hgroup>

<nav>

<footer>

<datalist>

<progress>

<time>

HTML5 Tags

Page 12: Progressive Prototyping w/HTML5, CSS3 and jQuery

Organization / StructureHTML helps you think about the

DESIGN

Page 13: Progressive Prototyping w/HTML5, CSS3 and jQuery

html page structureA typical HTML page will use divs with IDs and Classes to create the structure.

div  id=header

div  id=footer

div  id=  sidebar

div  id=content

div  id=nav

Page 14: Progressive Prototyping w/HTML5, CSS3 and jQuery

HTML5 page structureHTML5 gives semantic meaning to these structures, which previously required IDs and Classes.

header

footer

asidesection/article

Page 15: Progressive Prototyping w/HTML5, CSS3 and jQuery

Pro tip: Update your reset.cssarticle,  aside,  footer,  header,  hgroup,  nav,  section  {display:block;  margin:0;  padding:0;  border:0;  font-­‐weight:inherit;  font-­‐style:inherit;  font-­‐size:100%;  font-­‐family:inherit;  vertical-­‐align:baseline;  list-­‐style:none;  outline:none}

Page 16: Progressive Prototyping w/HTML5, CSS3 and jQuery

Pro tip: Update your reset.cssarticle,  aside,  footer,  header,  hgroup,  nav,  section  {display:block;  margin:0;  padding:0;  border:0;  font-­‐weight:inherit;  font-­‐style:inherit;  font-­‐size:100%;  font-­‐family:inherit;  vertical-­‐align:baseline;  list-­‐style:none;  outline:none}

Page 17: Progressive Prototyping w/HTML5, CSS3 and jQuery

html5 RecursivenessHTML5 allows for multiple sections and articles within a single page. Each section/article can have its own header, footer, aside and nav.

footer

asidesection

header

nav

header

footer

article

Page 18: Progressive Prototyping w/HTML5, CSS3 and jQuery

html5 RecursivenessHTML5 allows for multiple sections and articles within a single page. Each section/article can have its own header, footer, aside and nav.

footer

asidesection

header

nav

header

footer

article

Page 19: Progressive Prototyping w/HTML5, CSS3 and jQuery

html5 RecursivenessHTML5 allows for multiple sections and articles within a single page. Each section/article can have its own header, footer, aside and nav.

footer

asidesection

header

nav

header

article

footer

Page 21: Progressive Prototyping w/HTML5, CSS3 and jQuery

Pro tip: Smack IE Into Shape<!DOCTYPE  html>

<html>

<head>

<!-­‐-­‐[if  lt  IE  9]>

<script  src="http://html5shiv.googlecode.com/svn/trunk/html5.js"  type="text/javascript"></script>

<![endif]-­‐-­‐>

</head>

Page 22: Progressive Prototyping w/HTML5, CSS3 and jQuery
Page 23: Progressive Prototyping w/HTML5, CSS3 and jQuery
Page 24: Progressive Prototyping w/HTML5, CSS3 and jQuery

HTML5 Input Typesdate

date-­‐time

email

tel

range

search

time

url

Page 25: Progressive Prototyping w/HTML5, CSS3 and jQuery

Pro tip: HTML5 Search Input<form>    <input  type="search"  name="q"  placeholder="Search"  autofocus>    <input  type="submit"  value="Search"></form>

Page 26: Progressive Prototyping w/HTML5, CSS3 and jQuery

HTML5 Registration Form<form>    <input  name="Full  Name"  placeholder="Enter  your  full  name"  autofocus  required>    <input  type="email"  name="Email"  placeholder="Enter  your  email  address"  required>    <input  type="url"  name="URL"  placeholder="What’s  your  website  address?">    <input  type="submit"  value="Register"></form>

Page 27: Progressive Prototyping w/HTML5, CSS3 and jQuery

http://bit.ly/HTML5_mobileEmail URL

Page 28: Progressive Prototyping w/HTML5, CSS3 and jQuery

Gettin’ Sexy with CSS3It’s the New Photoshop

Page 29: Progressive Prototyping w/HTML5, CSS3 and jQuery

Fancy Button

.btn-­‐fancy  {}

Page 30: Progressive Prototyping w/HTML5, CSS3 and jQuery

Border Radiusborder:1px  solid  #bc6647;  border-­‐radius:6px;  -­‐moz-­‐border-­‐radius:6px;  -­‐webkit-­‐border-­‐radius:6px;

Fancy Button

Page 31: Progressive Prototyping w/HTML5, CSS3 and jQuery

Box Shadow-­‐moz-­‐box-­‐shadow:  4px  4px  8px  #a2a2a2;  

-­‐webkit-­‐box-­‐shadow:  4px  4px  8px  #a2a2a2;

box-­‐shadow:  4px  4px  8px  #a2a2a2;  

Fancy Button

Page 32: Progressive Prototyping w/HTML5, CSS3 and jQuery

TExt Shadowtext-­‐shadow:  1px  1px  0  #d2572b;}

Fancy Button

Page 33: Progressive Prototyping w/HTML5, CSS3 and jQuery

Background Gradientbackground:  #e67646;  background:-­‐moz-­‐linear-­‐gradient(center  top,  #eb9972,  #e67646  55%,  #d2572b);  background:-­‐webkit-­‐gradient(linear,  0%  0%,  0%  100%,  from(#eb9972),  color-­‐stop(0.55,  #e67646),  to(#d2572b));

Fancy Button

Page 34: Progressive Prototyping w/HTML5, CSS3 and jQuery

Anatomy of a CSS3 Button.btn-­‐primary  {padding:  .5em  .9em;  background:  #e67646;  background:-­‐webkit-­‐gradient(linear,  0%  0%,  0%  100%,  from(#eb9972),  color-­‐stop(0.55,  #e67646),  to(#d2572b));  background:-­‐moz-­‐linear-­‐gradient(center  top,  #eb9972,  #e67646  55%,  #d2572b);  -­‐moz-­‐border-­‐radius:6px;  -­‐webkit-­‐border-­‐radius:6px;  border-­‐radius:6px;  border:1px  solid  #bc6647;  -­‐moz-­‐box-­‐shadow:0  0  0;  -­‐webkit-­‐box-­‐shadow:0  0  0;  font-­‐size:  1.375em;  font-­‐weight:  500;  color:  #fff;  text-­‐shadow:  1px  1px  0  #d2572b;}

Page 35: Progressive Prototyping w/HTML5, CSS3 and jQuery

Anatomy of a CSS3 Button.btn-­‐primary  {padding:  .5em  .9em;  background:  #e67646;  background:-­‐webkit-­‐gradient(linear,  0%  0%,  0%  100%,  from(#eb9972),  color-­‐stop(0.55,  #e67646),  to(#d2572b));  background:-­‐moz-­‐linear-­‐gradient(center  top,  #eb9972,  #e67646  55%,  #d2572b);  -­‐moz-­‐border-­‐radius:6px;  -­‐webkit-­‐border-­‐radius:6px;  border-­‐radius:6px;  border:1px  solid  #bc6647;  -­‐moz-­‐box-­‐shadow:0  0  0;  -­‐webkit-­‐box-­‐shadow:0  0  0;  font-­‐size:  1.375em;  font-­‐weight:  500;  color:  #fff;  text-­‐shadow:  1px  1px  0  #d2572b;}

Page 36: Progressive Prototyping w/HTML5, CSS3 and jQuery

Anatomy of a CSS3 Button.btn-­‐primary  {padding:  .5em  .9em;  background:  #e67646;  background:-­‐webkit-­‐gradient(linear,  0%  0%,  0%  100%,  from(#eb9972),  color-­‐stop(0.55,  #e67646),  to(#d2572b));  background:-­‐moz-­‐linear-­‐gradient(center  top,  #eb9972,  #e67646  55%,  #d2572b);  -­‐moz-­‐border-­‐radius:6px;  -­‐webkit-­‐border-­‐radius:6px;  border-­‐radius:6px;  border:1px  solid  #bc6647;  -­‐moz-­‐box-­‐shadow:0  0  0;  -­‐webkit-­‐box-­‐shadow:0  0  0;  font-­‐size:  1.375em;  font-­‐weight:  500;  color:  #fff;  text-­‐shadow:  1px  1px  0  #d2572b;}

Page 37: Progressive Prototyping w/HTML5, CSS3 and jQuery

Anatomy of a CSS3 Button.btn-­‐primary  {padding:  .5em  .9em;  background:  #e67646;  background:-­‐webkit-­‐gradient(linear,  0%  0%,  0%  100%,  from(#eb9972),  color-­‐stop(0.55,  #e67646),  to(#d2572b));  background:-­‐moz-­‐linear-­‐gradient(center  top,  #eb9972,  #e67646  55%,  #d2572b);  -­‐moz-­‐border-­‐radius:6px;  -­‐webkit-­‐border-­‐radius:6px;  border-­‐radius:6px;  border:1px  solid  #bc6647;  -­‐moz-­‐box-­‐shadow:0  0  0;  -­‐webkit-­‐box-­‐shadow:0  0  0;  font-­‐size:  1.375em;  font-­‐weight:  500;  color:  #fff;  text-­‐shadow:  1px  1px  0  #d2572b;}

Page 38: Progressive Prototyping w/HTML5, CSS3 and jQuery

CSS3 RGBA and Opacityrgba  (238,88,0,1.0);

#d2572b;  opacity:1.0;

rgba  (238,88,0,0.5);

#d2572b;  opacity:0.5;

Page 39: Progressive Prototyping w/HTML5, CSS3 and jQuery
Page 40: Progressive Prototyping w/HTML5, CSS3 and jQuery

Hit me with some jQuery!

Page 41: Progressive Prototyping w/HTML5, CSS3 and jQuery

Simple JavaScript Function $('#PostMessage').click(function() {

$('tr.new-comment').fadeIn();

return false;

});

Page 42: Progressive Prototyping w/HTML5, CSS3 and jQuery

Double Time $('#PostMessage').click(function() {

$('#CommentForm').hide();

$('tr.new-comment').fadeIn();

return false;

});

Page 43: Progressive Prototyping w/HTML5, CSS3 and jQuery

Resourceshttp://www.w3.org/TR/html5/  

http://www.w3.org/Style/CSS/current-­‐work.en.html  

http://html5shiv.googlecode.com/svn/trunk/html5.js

http://modernizr.com/  

http://diveintohtml5.org/

http://reframerapp.com  

HTML5 Spec

CSS3 Spec

HTML5SHIV

Modernizer

Dive Into HTML5

Reframer

Page 44: Progressive Prototyping w/HTML5, CSS3 and jQuery

http://bit.ly/protobk

@zakiwarfelon The Twitters

Thrifty, Fast, and Effective User Experience Research Techniques

Russ UngerTodd Zaki Warfel

GuerrillaUXResearchMethods