Slide 1

Slide 1 text

Building theguardian.com @patrickhamann - Smashing Conf - December 2014

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

next.theguardian.com

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

115million !

Slide 6

Slide 6 text

" # $ 7000

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Setting a budget https://flic.kr/p/eHsirY

Slide 9

Slide 9 text

1. Build modular and decoupled systems, not sites. 2. Design features for access first, agnostic of device. 3. Embrace the unpredictable nature of the web. 4. Every feature must be measurable.

Slide 10

Slide 10 text

Build modular systems

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

You think you’re redesigning the website, but actually you’re redesigning the news room. — Nick Haley, Director of UX, The Guardian

Slide 13

Slide 13 text

Section A B C D E A B C Article

Slide 14

Slide 14 text

Section A B C D E A B C Article D

Slide 15

Slide 15 text

Organisations which design systems… are constrained to produce designs which are copies of the communication structures of these organisations. — M. Conway

Slide 16

Slide 16 text

Sections News Sport Comment is free Tech Business

Slide 17

Slide 17 text

Sections News Sport Comment is free Tech Business Blended Headlines Highlights Popular In depth People

Slide 18

Slide 18 text

1 Item

Slide 19

Slide 19 text

1 2 3 Slice

Slide 20

Slide 20 text

1 2 3 4 5 6 7 Container

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

item-three-q item-q item-q item-q item-q item-q btn

Slide 26

Slide 26 text

24px / 28px 14px / 18px 20px / 24px-q 18px / 24px 14px / 18px 18px / 24px 18px / 24px 18px / 24px 14px / 18px 12px / 16px 12px / 16px

Slide 27

Slide 27 text

24px / 28px 14px / 18px 20px / 24px-q 18px / 24px 14px / 18px 18px / 24px 18px / 24px 18px / 24px 14px / 18px 12px / 16px 12px / 16px header 4 headline 1 header 2 header 3 headline 1 header 3 header 3 header 3 headline 1 data 3 data 3

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

http://github.com/guardian/guss-typography

Slide 32

Slide 32 text

http://github.com/sass-mq

Slide 33

Slide 33 text

item-quater

Slide 34

Slide 34 text

item-quater fs-header(2) fs-data(3) gs-span(3) gs-height(6) colour($c-feature-main)

Slide 35

Slide 35 text

1. Build modular and decoupled systems, not sites. 2. Design features for access first, agnostic of device. 3. Embrace the unpredictable nature of the web. 4. Every feature must be measurable.

Slide 36

Slide 36 text

Design for access first

Slide 37

Slide 37 text

We don't have any non-JavaScript users No, all your users are non-JS while they're downloading your JS.
 Jake Archibald — Google

Slide 38

Slide 38 text

Credit: BBC Responsive News – Tom Maslen | http://responsivenews.co.uk/post/18948466399/cutting-the-mustard

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

User Content API Popular Comments Article DB DB

Slide 41

Slide 41 text

https://flic.kr/p/77ZtUH

Slide 42

Slide 42 text

User Content API Popular Comments Article DB DB

Slide 43

Slide 43 text

Final progressively enhanced page Initial page payload

Slide 44

Slide 44 text

` Interface Informative Decorative Vector (SVG)
 Icon font Bitmap (JPG, PNG) Bitmap (JPG, PNG) CSS image replacement

 CSS background Remove? Credit: Paul Robert Lloyd – This is for Everyone https://speakerdeck.com/paulrobertlloyd/this-is-for-everyone-ldnia-number-4?slide=38

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

(75%) (90%) (90%)
(75%)

Slide 48

Slide 48 text

1. Build modular and decoupled systems, not sites. 2. Design features for access first, agnostic of device. 3. Embrace the unpredictable nature of the web. 4. Every feature must be measurable.

Slide 49

Slide 49 text

Embrace unpredictability

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

Progressive enhancement is about resilience as much as it is about inclusiveness. 
 @bradwright — Government Digital Service

Slide 52

Slide 52 text

Source: Google - Pagespeed Insights

Slide 53

Slide 53 text

Request page Network Render GET html Build DOM response Build CSSOM Render page GET css GET js response response idle idle Async Render blocking Run JS Source: Google - Web Fundamentals

Slide 54

Slide 54 text

Request page Network Render GET html Build DOM response Build CSSOM Render page GET css GET js response response idle idle Async Render blocking Run JS

Slide 55

Slide 55 text

Popular content ✘ Sharing ✘ Comments ✘ Related content ✘ Commercial components ✘ Article ✔

Slide 56

Slide 56 text

WTF%$?!

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

0.9 1.0 1.1 1.2 0.9 1.0 1.1 1.2

Slide 59

Slide 59 text

Is modern browser? Requet with Request with CSS in localStorage? localStorage space? Request with AJAX cache in localStorage inject into

Slide 60

Slide 60 text

Load time First byte Start render Visually complete 3.366s 0.204s 1.113s 3.700s Before After Load time First byte Start render Visually complete 3.017s 0.262s 0.759s 2.00s

Slide 61

Slide 61 text

https://github.com/addyosmani/critical http://ngxpagespeed.com/ Penthouse https://github.com/pocketjoso/penthouse

Slide 62

Slide 62 text

Story of my life

Slide 63

Slide 63 text

What does the future hold?

Slide 64

Slide 64 text

http/2

Slide 65

Slide 65 text

 & HTML " & CSS  " HTTP/1.1 ' HTML & CSS  " HTTP/2 Server push

Slide 66

Slide 66 text

service worker ServiceWorker

Slide 67

Slide 67 text

ServiceWorker  " &

Slide 68

Slide 68 text

ServiceWorker  " & &

Slide 69

Slide 69 text

1. Build modular and decoupled systems, not sites. 2. Design features for access first, agnostic of device. 3. Embrace the unpredictable nature of the web. 4. Every feature must be measurable.

Slide 70

Slide 70 text

Measure everything

Slide 71

Slide 71 text

If it moves, graph it!
 — Laurie Denness, Etsy

Slide 72

Slide 72 text

assets radiator

Slide 73

Slide 73 text

window.performance.timing

Slide 74

Slide 74 text

window.performance.mark('foo-bar')

Slide 75

Slide 75 text

speedcurve

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

What does the future hold?

Slide 79

Slide 79 text

Resource Timing

Slide 80

Slide 80 text

Beacon API

Slide 81

Slide 81 text

1. Build modular and decoupled systems, not sites. 2. Design features for access first, agnostic of device. 3. Embrace the unpredictable nature of the web. 4. Every feature must be measurable.

Slide 82

Slide 82 text

Lessons

Slide 83

Slide 83 text

Design is not a service. Designers have to sit in the team.


Slide 84

Slide 84 text

The network is intrinsically unreliable, defend against it.


Slide 85

Slide 85 text

Deliver core content first,
 then progressively enhance the extras.


Slide 86

Slide 86 text

Set a performance budget.
 Measure, optimise & repeat!


Slide 87

Slide 87 text

Thank you. Questions? @patrickhamann - Smashing Conf - December 2014 github.com/guardian/frontend ( bit.ly/smashing-guardian )