HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

131
Bringing sexy back to the mobile web

Transcript of HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Page 1: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Bringing sexy back to the mobile web

Page 2: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Mohammad (Mo) Jangda

[email protected]@vortexmobile.ca

http://digitalize.ca@mjangda

Page 3: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Move over Jesse James Garret!

We've found the new AJAX!

Page 4: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

• HTML4 all grown up?

• xHTML's way cooler cousin?

• 5 Highly Trained Militant Lemurs?

Steve JobsInventor of HTML5

Page 5: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

HTML

CSS

JavaScript

Page 6: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Semantics

Forms

Geolocation

Offline

Presentation

StylingTransformsAnimations

Rich MediaAudioVideo

Canvas

Minus some legitimate & illegitimate cousins...

Web Workers

Web Sockets

Storage

Page 7: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 8: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Good markup is healthy markup.

Page 9: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

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.

Page 10: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

APIs that help us build more powerful, feature-rich mobile webapps.

Helping bridge the gap between native and web.

Page 11: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Page 12: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

•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

Page 13: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 14: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 15: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

<video src=“movie.mp4” />

<audio src=“sound.wav” />

Simple

Page 16: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

<video width=”320” height=”240” poster=”poster.png”> <source src="video.m4v" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> <source src="video.webm" type='video/webm; codecs="vp8, vorbis"' /> <source src="video.ogv" type='video/ogg; codecs="theora, vorbis"' /> <object> <!-- Add Flash fallback here --> <!-- Be nice to really dumb devices --> <p>Download the <a href="video.mp4">video</a></p> </object></video>

Advanced

Page 17: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Player is customizable and programmatically

accessible through javascript (i.e. play, pause, etc.)

Not the case on mobile devices(iPad excluded)

Page 18: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Most devices offload audio and video playback to

their native media players...which is

a good thing

Page 19: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Oh, and support kinda sucks...

YAUFW!(Yet Another Unnecessary Format War)

Page 20: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 21: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

<div class="qzForm roundedcornr_box_812460"><div class="roundedcornr_top_812460">

<div></div></div><div class="roundedcornr_content_812460">

Your content goes here!</div>

<div class="roundedcornr_bottom_812460"><div></div>

</div></div>

<style>/* Rounded corner for registration tab */

.roundedcornr_box_812460 { background: url(../images/rounded/roundedcornr_812460_tl.png) no-repeat top left;

} .roundedcornr_top_812460 {

background: url(../images/rounded/roundedcornr_812460_tr.png) no-repeat top right; } .roundedcornr_bottom_812460 {

background: url(../images/rounded/roundedcornr_812460_bl.png) no-repeat bottom left; } .roundedcornr_bottom_812460 div {

background: url(../images/rounded/roundedcornr_812460_br.png) no-repeat bottom right; } .roundedcornr_content_812460 {

background: url(../images/rounded/roundedcornr_812460_r.png) top right repeat-y; }

.roundedcornr_top_812460 div,.roundedcornr_top_812460, .roundedcornr_bottom_812460 div, .roundedcornr_bottom_812460 {

width: 100%; height: 15px; font-size: 1px;

} .roundedcornr_content_812460, .roundedcornr_bottom_812460 {

/*margin-top: -19px;*/ } .roundedcornr_content_812460 { padding: 0 15px; }</style>

Pre-CSS3: Rounded Corners

Page 22: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

CSS3: Rounded Corners

<div class=“rounded”>This is content

</div>

<style type=“text/css”>.rounded {

border-radius: 5px;border: 1px solid #111;

}</style>

Page 23: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Yes, we just went from 3 billion lines of code...

...to just under 10.

Page 24: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Rounded corners:border-radius

Drop shadows: box-shadow & text-shadow

Multiple columns:column-count & column-gap

Transparent backgrounds:rgba

Multiple backgrounds

Background gradients

Page 25: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Page 26: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

border-radius

-moz-border-radius (for Fennec / FF)-o-border-radius (for Opera Mobile)-webkit-border-radius (in Mobile Safari, Android, webOS, BB6)-ms-border-radius (in IE Mobile)

Page 27: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 28: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Well, close enough.

Page 29: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Attribute pattern-matching

starts with[rel^=”awesome”]

ends with[title$=”amazing”]

contains[name*=”super”]

Page 30: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Element matching

nth-childnth-child(odd) nth-child(2) nth-child(2n)

nth-last-childsame as above, except working backwards

not:not(input)

and a whole bunch of others...

Page 31: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 32: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box1#Box1

Meet Mr. Box.

Page 33: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box1

#Box1

Feelin’ Tipsy, Mr. Box?

#Box1 { transform: rotate(45deg);}

Page 34: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box1#Box1

Feelin’ Out of Place, Mr. Box?

#Box1 { transform: translate(10px, 10px);}

#Box1#Box1

Page 35: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box1#Box1

Feelin’ (Vertically) Out of Place, Mr. Box?

#Box1 { transform: translateY(10px);}

#Box1#Box1

Page 36: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box1#Box1

Feelin’ (Horizontally) Out of Place, Mr. Box?

#Box1 { transform: translateX(10px);}

#Box1#Box1

Page 37: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Feelin’ a little bloated, Mr. Box?

#Box1 { transform: scale(2);}

#Box1#Box1

Page 38: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Feelin’ weak, Mr. Box?

#Box1 { transform: scale(0.5);}

#Box#Box11

Page 39: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box1#Box1

How’s the weather up there, Mr. Box?

#Box1 { transform: scaleY(2);}

Ate too much, Mr. Box?

#Box1 { transform: scaleX(2);}

#Box1#Box1

Page 40: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

View (a)skew , Mr. Box?

#Box1 { transform: skew(-30deg, 30deg);}

Page 41: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

iPhone-only at this point.(though, possibly BlackBerry 6 as well)

Page 42: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Transform in Z-space using Z properties.

scaleZrotateZ

rotate3DtranslateZ

Page 43: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 44: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 45: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 46: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CSS animations are smoother, faster, and require far less code.

And just for kicks, we’ll throw in some hardware acceleration

too.

Page 47: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 48: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 49: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 50: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 51: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 52: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

transition: 1s;

Page 53: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Whenever a property for the transition-ready element changes, the browser

auto-tweens the element for you!

Page 54: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#container { transition: 1s;}

#container:hover { opacity: 0.4}

Page 55: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

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: 0Can be negative. Will start as if pre-animated.

Page 56: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Transition Properties (cont’d)

Which timing curve should we use?transition-timing-function: ease-out;

default: ease

Other values:

linearease-in

ease-outease-in-out

cubic-bezier (custom-defined)

Page 57: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

Page 58: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Feeling lazy? Shorthand it.

p { transition: color 1s ease-in 2s;}

Might change to:

p { transition: color 1s/2s ease-in;}

Page 59: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Want to make everything transition-ready?

(though, probably a bad idea)

* { transition: 1s;}

Page 60: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Whenever possible, use classes instead of direct CSS

manipulation.Generally yields better performance.

Page 61: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

What about complex animations?

Combine multiple transitions!

Page 62: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 63: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

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; }}

Page 64: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Animation Properties

Same as beforeanimation-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.

Page 65: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Page 66: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 67: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 68: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 69: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box2#Box2#Box1#Box1

Remember Mr. Box?Say Hello to Mrs. Box.

Page 70: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box2#Box2#Box1#Box1

Let’s get animating!

Page 71: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box2#Box2#Box1#Box1

Flip horizontally

transform: rotateY(180deg);

Page 72: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Box2#Box2#Box1#Box1

Re-position and wrap

position: absolute;

#Container#Container

position: relative;

Page 73: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Container#Container

Box 2Box 2#Box1#Box1

Enable 3D animation

#container { transform-style: preserve-3d; transition: transform 1s;}

Page 74: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Container#Container

Box 2Box 2#Box1#Box1

Page 75: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Container#Container

#Box1#Box1

Get flippy

#container:hover { transform: rotateY(180deg);}

#Box2#Box2

Page 76: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#Container#Container

Box 2Box 2#Box1#Box1

Page 77: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

#container.flipped { transform: rotateY(180deg);}

<div id=”container” onclick=”this.className = ‘flipped’”>...</div>

Because :hover and mobile don’t always get along...

Page 79: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 80: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

A blank slate with which you can do (almost) anything:

- create elements, shapes, lines, images, 3D things, text.- modify them- animate them- etc.

Page 81: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 82: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 83: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 84: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(success, error);

} else {alert('Your device doesn\'t support HTML5 geolocation');

}

Page 85: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

function success( position ) {alert( 'Latitude: ' + position.coords.latitude );alert( 'Longitude: ' + position.coords.longitude );// position exposes other properties as well:// timestamp, accuracy, heading, altitude, etc.

}

Page 86: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

function error( error ) {alert( 'Sorry, we could\’nt figure out your location!' );console.error( 'Error', error.code, error.message );// error codes:// 1: location permission denied// 2: location fetch failed// 3: timeout// 0: unknown

}

Page 87: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Not quite stalker-ish enough for you?

Page 88: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

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 stalkingclearWatch(watch);

Page 89: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 90: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

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

Page 91: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 92: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Let’s Map It

Page 93: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

<div id="map"> </div> <script src="http://maps.google.com/maps/api/js?sensor=false"></script> <script> function initMap(id) { var mapOptions = {

center: new google.maps.LatLng(0, 0), zoom: 15, mapTypeId: google.maps.MapTypeId.ROADMAP };

return new google.maps.Map(document.getElementById(id), mapOptions); }

var map = initMap('map');

</script>

Initialize the map

Page 94: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

Add User’s Location to the map

<script> function mapPosition(map, lat, lng) { var position = new google.maps.LatLng(lat, lng);

markerOptions = { position: position, map: map }; var marker = new google.maps.Marker(markerOptions); map.setCenter(position); return marker;

}

if(navigator.geolocation) {navigator.geolocation.getCurrentPosition(

function( position ) { mapPosition(map, position.coords.latitude,position.coords.longitude); }, function( error ) { alert(error.message); } );

}

</script>

Page 95: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 96: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Let’s Geocode It.

Page 98: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

Client-side

new google.maps.Geocoder();geocoder.geocode( {

'latLng': new google.maps.LatLng(lat, lng)},function(results, status) {

for( var i = 0; i < data.results.length; i++ ) {var result = results[i];if(result.types[0] == 'locality' && result.types[1] == 'political') {

alert('Your city: ' + result.formatted_address);}

}}

);

Page 99: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Connect with any of the 3 trillion Location-based APIs out there.

Page 100: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 101: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Cache for storing HTML,

CSS, JS required for offline usage.

Cache for storing data.

3 flavours:

sessionStoragelocalStorage

Web SQL

(and a few other types being cooked up for the

future...)

Page 102: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

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.

Page 103: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

<!DOCTYPE HTML><html manifest="offline-manifest">

CACHE MANIFESTindex.htmlhelp.htmlstyle/main.cssimages/logo.pngimages/cupcakes.png

Specify the manifest file

offline-manifest file

Page 104: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

sessionStorage.haveMessage = true;

localStorage.messages = [ ‘Hello World’ , ‘Goodbye World’]

Window 1

Window 2

Page 105: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

sessionStorage.haveMessage=> truelocalStorage.messages=> [ ‘Hello World’, ‘Goodbye World’ ]

Window 1

Window 2

sessionStorage.haveMessage=> nulllocalStorage.messages=> [ ‘Hello World’, ‘Goodbye World’ ]

Page 106: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Full-fledged SQLLite database in the browser!

Page 107: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

// Basic API methods

db = openDatabase( name, version );

db.transaction( callback );

transaction.executeSql( sql, values, success, error );

Page 108: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

// Create database connection// @params: name, version, display name, size in bytes var db = openDatabase('bakery', '1.0', 'My Bakery', 1048576);

Page 109: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

// Create tabledb.transaction(function(trans) { trans.executeSql('CREATE TABLE IF NOT EXISTS Cupcakes (name TEXT, description TEXT)', []);});

Page 110: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

// Add entriesdb.transaction(function(trans) {

trans.executeSql('INSERT INTO Cupcakes VALUES (?, ?)', ['Vanilla', 'Good ol vanilla!']); trans.executeSql('INSERT INTO Cupcakes VALUES (?, ?)', ['Chocolate', 'Good ol chocolate!']);});

Page 111: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

// Select entriesdb.transaction(function(trans) {

trans.executeSql(‘SELECT * FROM Cupcakes’, [], function(trans, results) {for(var i = 0; i < results.rows.length; i++) {

var cupcake = results.rows.item(i);document.getElement('cupcakes').innerHTML += '<li>' + cupcake.name + ':</strong> ' + cucpake.description + '</li>';

} alert('We\'ve got ' + results.rows.length + ' cupcake(s)');

});});

Page 112: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 113: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

sessionStorage: CupcakelocalStorage: Slice of cake

Web SQL: Multi-tiered wedding cake

(Though, the last two can vary depending on your views on SQL / noSQL)

Page 114: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 115: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Gmail Web SQL databaseRecent messages are pre-fetched. Certain data (labels)

is pre-fetched. Requires force refresh for update.

Page 116: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

YouTube localStorageCaches AJAX requests, search history, user actions, etc.

Page 117: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

window.onhashchange / pushState

Build true event-driven, dyanmic sites with solid back button support and fragement

urls.

Page 118: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

data-attributes

Store data as attributes within DOM Elements.

Page 119: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

CO

DE

<a data-flavour=”chocolate”>Cupcake!</a>

(Accessed via element.dataset.flavour => chocolate)

Page 120: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 121: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Get User Location(geolocation)

Store Favourite Cities(localStorage)

Pre-fetch long-term forecast(Web SQL)

Weather Trends Graphs(Canvas)

Eye Candy(CSS3 transitions /

animations)

Video Weather Report(<video>)

Page 122: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Because only nerds build everything from

scratch.

Page 123: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

iUI

Page 124: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

jQTouch

Page 125: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

SenchaTouch

Page 126: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

SproutCore

Page 127: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

jQuery Mobile

Page 128: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

processing.js

raphael.jsgeolocation (with fallbacks)

jQuery.animate + CSS3 Animationspersistence.js (with fallback to Gears)

Page 129: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.
Page 130: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

’Hardware access?

Notifications?Mind control?

Page 131: HTML5, CSS3 and other fancy buzzwords Bringing sexy back to the mobile web.

Mohammad JangdaVortex Mobile

[email protected]@vortexmobile.ca

http://digitalize.ca@mjangda