learning to love html and css

33
learning to love html (for grumpy developers) @jongalloway

Upload: jon-galloway

Post on 02-Jul-2015

20.492 views

Category:

Technology


3 download

DESCRIPTION

Presented at NDC 2012. Video: http://vimeo.com/43548698

TRANSCRIPT

Page 1: learning to love html and css

learning to love html

(for grumpy developers)

@jongalloway

Page 2: learning to love html and css

hi!

http://weblogs.asp.net/jgalloway

Page 3: learning to love html and css

why?

falling in love

the honeymoon

marriage counseling

Page 4: learning to love html and css

why?

lessons from javascript

Page 5: learning to love html and css

falling in love

what does a document offer?

structured content

not design

not logic

Page 6: learning to love html and css

why?

it’s what we share

with designers

with our users

the only code you write that the world sees

Page 7: learning to love html and css

falling in love

avoiding the cheap floozycode smells

difficult to maintain

trapped

supporting browsers (and versions)

reliance on grids / frameworks / tools

Page 8: learning to love html and css

falling in love

love it for what it is…

a document format

Page 9: learning to love html and css

falling in love

document vs. application

tools

developers

but you deliver documents

Page 10: learning to love html and css

true love

♥ html

Page 11: learning to love html and css

the honeymoon

joy!clean code (occupy your codebase!)

Page 12: learning to love html and css

the honeymoon

joy!

clean code is flexible

(story time)

Page 13: learning to love html and css
Page 14: learning to love html and css
Page 15: learning to love html and css
Page 16: learning to love html and css

the honeymoon

joy!

adaptive layout

Page 17: learning to love html and css

the honeymoon

joy!

seo: a structured document is machine readable

Page 18: learning to love html and css

the honeymoon

clear communication

semantic markup is easier, cleaner

asp.net templates

Page 19: learning to love html and css

the honeymoon

selectors get so easy!

css

jquery

testing

$('section.mentions header img').hide()

Page 20: learning to love html and css

marriage counseling

Page 21: learning to love html and css

marriage counseling

your html as an api

separation of concerns

smoothly factored pieces agree

Page 22: learning to love html and css

marriage counseling

browsersstop fixating on browsers

you are not your browser

your browser doesn’t matter to users

land of a thousand browsers

common ground

resets? okay…

normalize is better!http://necolas.github.com/normalize.css/

Page 23: learning to love html and css

marriage counseling

progressive enhancement

build for your main use case

enhance using feature detection

Page 24: learning to love html and css

marriage counseling

progressive enhancement

shim for downlevel

modernizr

conditional comments

content fallback

Page 25: learning to love html and css

marrige counseling

… let’s talk ie

quirks mode! (watch doctype)

Page 26: learning to love html and css

marrige counseling

… let’s talk ie

developer tools

document mode (rendering)

browser mode (requesting)

Page 27: learning to love html and css

marriage counseling

pixel hell

users don’t count pixels

Page 28: learning to love html and css

marriage counseling

pixel hell

avoiding pixel hell

get there first

get out of mockup mode

photoshop is not a web standard

Page 29: learning to love html and css

marriage counseling

positioning and layout

floats

http://css.maxdesign.com.au/floatutorial/

Page 30: learning to love html and css

marriage counseling

positioning and layout

floats

float one way

Page 31: learning to love html and css

marriage counseling

positioning and layout

padding / margins

use developer tools

use page inspector

Page 32: learning to love html and css

marriage counseling

focus on a structured documentstart with an outline – like writing

keep things structured

refactor (?!)

Page 33: learning to love html and css

learning to love html

(for grumpy developers)

@jongalloway