4. What exactly is
an HTML5?
• HTML4 all grown up?
• xHTML's way cooler cousin?
• 5 Highly Trained Militant Lemurs? Steve Jobs
Inventor of HTML5
5. a bit of HTML
+
a dash of CSS
+
a whole sprinkling of JavaScript
6. The HTML5 Family
Semantics Geolocation
Forms Offline
Presentation Storage
Styling
Transforms
Animations
Web
Workers
Rich Media
Audio
Video Web Sockets
Canvas
Minus some legitimate & illegitimate cousins...
9. Richness without
cost
Add all the whiz, bang, and fireworks without having to
rely on 3rd party libraries and plugins.
Stuff that took images and extra markup and hours to
perfect, now available through a CSS property or two.
10. New levels of
interactivity
APIs that help us build more powerful, feature-rich
mobile webapps.
Helping bridge the gap between native and web.
12. • It's finally growing up
• WebApps are better, smarter, sexier
• WebApps can do more with less
• WebApps can do the same, if not more
than Native Apps
17. Desktops have all the fun!
Player is customizable and programmatically accessible
through javascript (i.e. play, pause, etc.)
Not the case on mobile devices
(iPad excluded)
18. Most devices
offload audio and
video playback to
their native media
players...which is a
good thing
19. Oh, and support kinda sucks...
YAUFW!
(Yet Another Unnecessary Format War)
24. Some of the fancy new properties:
Rounded corners:
border-radius
Drop shadows:
box-shadow & text-shadow
Multiple columns:
column-count & column-gap
Transparent backgrounds:
rgba
Multiple backgrounds
Background gradients
25. Because CSS3 is not yet a finalized
spec, base properties don’t work in
most browsers.
Instead, you have to use the
proprietary prefix for each browser.
26. -moz-border-radius (for Fennec / FF)
-o-border-radius (for Opera Mobile)
border-radius
-webkit-border-radius (in Mobile
Safari, Android, webOS, BB6)
-ms-border-radius (in IE Mobile)
29. Attribute pattern-matching
starts with
[rel^=”awesome”]
ends with
[title$=”amazing”]
contains
[name*=”super”]
30. Element matching
nth-child
nth-child(odd) nth-child(2) nth-child(2n)
nth-last-child
same as above, except working backwards
not
:not(input)
and a whole bunch of others...
60. Transition Properties
Which properties should be animated?
transition-property: color;
default: all
How long should the transition take?
transition-duration: 1s;
default: 0, which means no animation.
Required!
Should we wait a bit before starting?
transition-delay: 0.5s;
default: 0
Can be negative. Will start as if pre-animated.
61. Transition Properties (cont’d)
Which timing curve should we use?
transition-timing-function: ease-out;
default: ease
Other values:
linear
ease-in
ease-out
ease-in-out
cubic-bezier (custom-defined)
74. Define tween checkpoints and the
properties to be changed at each.
#box1.animated {
animation-name: goCrazy
}
@keyframes goCrazy {
0% {
}
33% {
left: 200px;
}
66% {
-webkit-transform: rotate(-90deg);
}
100% {
-webkit-transform: scale(2);
opacity: 0;
}
}
75. Animation Properties
Same as before
animation-duration: 1s;
animation-delay: 0.5s;
animation-timing-function: ease-out;
Which direction should animations run?
animation-direction: alternate;
default: normal;
Which direction should animations run?
animation-iteration-count: 4;
default: 1;
Use infinite for a never-ending loop.
104. Exactly what it sounds
A blank slate with which you can do (almost) anything:
- create elements, shapes, lines, images, 3D things, text.
- modify them
- animate them
- etc.
112. if(navigator.geolocation) {
watch = navigator.geolocation.watchPosition( success );
// Callback triggered whenever position changes
// Success callback could add a point to a map
// Or refresh a list of nearby locations
// Etc.
}
// Stop stalking
clearWatch(watch);
CODE
114. Stalking Best Practices
Always provide a fallback!
IP location can suck.
GPSes are awesome, but satellites can have bad days.
Have an [edit location] button AND manual entry
125. Manifest Storage
Cache for storing HTML, CSS, JS Cache for storing data.
required for offline usage. 3 flavours:
sessionStorage
localStorage
Web SQL
(and a few other types being
cooked up for the future...)
126. Beyond just for "I'm going
underground" scenarios.
Pre-loading of content improves speed and prevents
repeated roundtrips to server.
Cache heavy or unique data loads that are unlikely to
change, e.g. location information, favourites, etc.
137. Depends on the specificity
and complexity of your use
cases.
sessionStorage: Cupcake
localStorage: Slice of cake
Web SQL: Multi-tiered wedding cake
(Though, the last two can vary depending on your views on SQL / noSQL)
154. What’s Next?
Hardware access?
Notifications?
Mind control?
155. Thank You!
Mohammad Jangda
Vortex Mobile
batmoo@gmail.com
mohammad.jangda@vortexmobile.ca
http://digitalize.ca
@mjangda
Hinweis der Redaktion
(Note: I've omitted some APIs, since they're not relevant or not yet prime-time ready)
In context of mobile, can mean the difference between a happy user and a hate mail user
Optimized for playback and Usability (big buttons)
(ever try using a Flash-based player with the teeniest of controls -- no offense Adobe)
It makes for a bit of a jagged UX
Images are dead
Okay, no.
Pure CSS graphics?
I'd say we're far from seeing that
matrix property = [a, b, c, d]
Though, tools coming out that will help make the process far easier.
Set z-index as well
Set z-index as well
Set z-index as well
Set z-index as well
Set z-index as well
Set z-index as well
Set z-index as well
Traditional user flows for location based apps
Enter City or Postal Code ---> Narrow Down Choices ---> Done
     (City -- long name)               (5 choices)                (done)
     (Postal Code --- wrong format)   ("Did you mean?")     (done)
Cut that down to two simple clicks
Work similar to XHR requests
--- Specify callbacks
--- Have to wait for the location in some instances (if the GPS is slow)
Caveat: WatchLocation stops when screen times out
Though, I’ve heard (but not tested) that web workers can get around this
Once allowed though, most devices remember the allow and won’t prompt the user again.
The one key thing needed to enable offline
Just a file that tells the browser what to cache
Browser serves up cached content when user's connection is offline
What about navigator.onLine / navigator.offLine ?
Supported, but Google thinks otherwise
sessionStorage is window-specific
localStorage is browser-specific
Standard key-value store 
Processing.js -> Canvas
Wrappers for geolocation (with fallback to Google IP geolocation)
CSS3 animation / transition support
etc