41
HTML5 for the Ruby Developer Seth Ladd Google Chrome DevRel

HTML5 for the Ruby Developer

Embed Size (px)

DESCRIPTION

Silicon Valley Ruby on Rails Meetup: www.meetup.com/rubymeetup Speaker: Seth Ladd Date: November 10, 2010

Citation preview

Page 1: HTML5 for the Ruby Developer

HTML5 for the Ruby Developer

Seth LaddGoogle Chrome DevRel

Page 2: HTML5 for the Ruby Developer

Learn JavaScript

Page 3: HTML5 for the Ruby Developer

Any Questions?

Page 4: HTML5 for the Ruby Developer

No, really...Learn JavaScript

Page 5: HTML5 for the Ruby Developer

The Modern Web App

1.Rich front end1.Business logic

2.JSON REST API3.Business logic4.Data store

Page 6: HTML5 for the Ruby Developer

Old 'n Busted

Page oriented designLong page loadsOnline onlyServer only business logicSynchronous behaviorProgressive enhancement

Page 7: HTML5 for the Ruby Developer

New Hotness

Action oriented designInsanely fastOfflineJavaScript heavy front-endAsynchronousGraceful degradation

Page 8: HTML5 for the Ruby Developer

Still Around

Beautiful URLsRESTJSONHTTPHTML5LinksRuby and Rails!!!

Page 9: HTML5 for the Ruby Developer

Audience Participation!

Page 10: HTML5 for the Ruby Developer

http://news.cnet.com/8301-13579_3-20006889-37.html

Page 11: HTML5 for the Ruby Developer

Smart Browsers

I found the future of the Internet,it's in my browser.

Page 12: HTML5 for the Ruby Developer

HTML5one big happy family

Page 13: HTML5 for the Ruby Developer

StorageandFiles

http://slides.html5rocks.com/#slide9

Page 14: HTML5 for the Ruby Developer

Semanticshttp://slides.html5rocks.com/#slide17

Page 15: HTML5 for the Ruby Developer

Multimediahttp://kurrik-slides.appspot.com/html5-techtalk/#slide18

Page 16: HTML5 for the Ruby Developer

CSS3http://slides.html5rocks.com/#slide40

Demo!

Page 17: HTML5 for the Ruby Developer

Graphicsand

Effectshttp://slides.html5rocks.com/#slide27

Demo!

Page 18: HTML5 for the Ruby Developer

Connectivityand

Networkinghttp://slides.html5rocks.com/#slide11

Demo!

Page 19: HTML5 for the Ruby Developer

DeviceAccess

http://slides.html5rocks.com/#slide14Demo!

Page 20: HTML5 for the Ruby Developer

caniuse.com

you betcha!

Page 21: HTML5 for the Ruby Developer

html5reset.org

don't start from scratch

Page 22: HTML5 for the Ruby Developer

html5boilerplate.com

tested, so you don't have to

Page 23: HTML5 for the Ruby Developer

http://bit.ly/rails3html5pre-configured Rails 3 project

using HTML5 Boilerplate

Page 24: HTML5 for the Ruby Developer

HTML5 Boilerplate

Cross browser (IE6!)Optimal caching and compression rulesMobile browser optimizationsHooked up to a test scriptPre-set best practicesMuch, much more

Page 25: HTML5 for the Ruby Developer

What would you have me do?

Spend my time hacking around issues in older technologies like Internet Explorer 6 or would you like that time spent making the site look the best that it can on better desktop browsers, as well as on the iPhone, iPod Touch, iPad, Blackberry and a whole host of other mobile devices?

- Andy Clarke

Page 26: HTML5 for the Ruby Developer

ChromeFramePluginyour escape hatch

Page 27: HTML5 for the Ruby Developer

Activating Chrome Frame

<meta http-equiv="X-UA-Compatible" content="chrome=1">

^-- (don't wrap in conditional comments)

or, HTTP Header:

X-UA-Compatible: chrome=1

Page 28: HTML5 for the Ruby Developer

TargetSmart

Browsersgracefully degrade

Page 29: HTML5 for the Ruby Developer

Rails 3The Future is Here

Page 30: HTML5 for the Ruby Developer

<!DOCTYPE html>You're doing it!

Page 31: HTML5 for the Ruby Developer

<meta charset="utf-8">

Not present in template,Rails 3 sets Content-Type header.

Page 32: HTML5 for the Ruby Developer

<%= video_tag"awesome.webm" %>

Page 33: HTML5 for the Ruby Developer

<%= audio_tag"awesome.mp3" %>

Page 34: HTML5 for the Ruby Developer

config.action_dispatch.best_standards_support = true

Turns on Chrome Frame.It's the default!

Page 35: HTML5 for the Ruby Developer

HTML5 Input Fields

<%= f.number_field %><%= f.email_field %><%= f.telephone_field, , :required => true %>etc

Search for "Rails 3, HTML 5 and client-side forms validations using Validator"

Page 36: HTML5 for the Ruby Developer

http://bit.ly/rails3offline

easy App Cache

Page 37: HTML5 for the Ruby Developer

Rails::Offline

match "/application.manifest" => Rails::Offline

CACHE MANIFESTjavascripts/application.jsjavascripts/jquery.jsimages/masthead.pngNETWORK:/

Page 38: HTML5 for the Ruby Developer

Build the Best Possible Experiencewith HTML5

and target Smart Browsers

Page 39: HTML5 for the Ruby Developer

Many Books

Page 40: HTML5 for the Ruby Developer

Resources

http://www.html5rocks.comhttp://slides.html5rocks.comhttp://html5doctor.comhttp://caniuse.comhttp://html5reset.orghttp://html5boilerplate.comhttp://diveintohtml5.orghttp://code.google.com/chrome/chromeframe/

Page 41: HTML5 for the Ruby Developer

Gaze Into the Future