Slide 1

Slide 1 text

Griass enk!

Slide 2

Slide 2 text

The perfect Steak Digital Visions 2013

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Lafers grill recipes The need precise control I need to put meat on fire

Slide 5

Slide 5 text

Weber-Kit

Slide 6

Slide 6 text

Controlled Environments

Slide 7

Slide 7 text

Controllable Environments

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Uncontrollable Environments

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

... to be honest ... only few of them come with their own engine

Slide 18

Slide 18 text

Under the top-most used browsers on iOS and Android

Slide 19

Slide 19 text

Fragmentation

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

iOS screen fragmentation

Slide 24

Slide 24 text

Android screen fragmentation

Slide 25

Slide 25 text

Holy fragmentation, Batman This is friggin' scary

Slide 26

Slide 26 text

And that is just Android ...

Slide 27

Slide 27 text

Viewport is one thing... Features? Implementation quality? Memory? Resolution? Browser Speed? Connection speed?

Slide 28

Slide 28 text

You can't control everything

Slide 29

Slide 29 text

Parallax Scrolling?

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

moto.oakley.com 1. 85.4 MB page weight 2. 471 HTTP Requests 3. 2 minutes 45 seconds until loading screen replaced with content 4. 4 minutes 10 seconds to wait for onLoad event

Slide 32

Slide 32 text

There sure is a mobile version? ... oh yeah, there is...

Slide 33

Slide 33 text

85.9 MB

Slide 34

Slide 34 text

Costs Roaming in Switzerland for EU clients is 1€ per MB

Slide 35

Slide 35 text

Costs vodafone UK charges 1£ per 25 MB

Slide 36

Slide 36 text

Assumptions Features: Scrolling Implementation quality: Tried, trusted and Robust Browser Speed: iPad-near JS execution time Memory: A shitload Resolution: Of course Retina! Connection speed: Harddrive

Slide 37

Slide 37 text

Features

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

overflow: scroll

Slide 41

Slide 41 text

-webkit-overflow-scrolling: touch

Slide 42

Slide 42 text

Feature detection Test for overflow-scrolling, otherwise use iScroll

Slide 43

Slide 43 text

var has3d = 'WebKitCSSMatrix' in window && 'm11' in new WebKitCSSMatrix()

Slide 44

Slide 44 text

The good: We did feature detects, and polyfilled in case

Slide 45

Slide 45 text

The bad: We assumed iScroll will fix all our problems iScroll assumed hardware acceleration is a good idea overall

Slide 46

Slide 46 text

The ugly: We broke IE10 on Windows Phone 8

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

When using skrollr on mobile you don't actually scroll. When detecting a mobile browser skrollr disables native scrolling and instead listens for touch events and moves the content

Slide 49

Slide 49 text

A classic $('a').on('click', function()) { window.location.href = $(this).attr('href'); }

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

Implementation qualitiy

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

-webkit-something: something

Slide 54

Slide 54 text

meta-Viewport

Slide 55

Slide 55 text

meta-Viewport

Slide 56

Slide 56 text

... not that it does anything ...

Slide 57

Slide 57 text

@media(max-width: 320px) { @ms-viewport { width: 320px } }

Slide 58

Slide 58 text

@-ms-viewport { width: device-width; }

Slide 59

Slide 59 text

Browser speed

Slide 60

Slide 60 text

Truth is ... JavaScript takes long to execute

Slide 61

Slide 61 text

$('.item.' + filterCriteria).each(function() { $(this).hide(); });

Slide 62

Slide 62 text

$('.filterArea').addClass('.filterCritera'); .filterCritera hasCritera { display: none; }

Slide 63

Slide 63 text

Where is JavaScript necessary?

Slide 64

Slide 64 text

Lanyrd

Slide 65

Slide 65 text

Lanyrd User Agent Detection ... done right! Got a slow JS engine? Don't get any JS.

Slide 66

Slide 66 text

Instagram on iOS5 2/13 - 7/13

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

Browsers other than Chrome don't priorize JS over IMG assets They take everything in order, to ensure nothing is missing on execution

Slide 71

Slide 71 text

Use JavaScript to load content that's only available with JavaScript

Slide 72

Slide 72 text

13s > 1.4s

Slide 73

Slide 73 text

sighjavascript.tumblr.com

Slide 74

Slide 74 text

Memory Resolution

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

SVG

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

Connection speed

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

A though one ... but rule of thumb is to reduce requests Load content that is necessary for the first impression

Slide 82

Slide 82 text

RESS Responsive & Server-Side

Slide 83

Slide 83 text

if ($(document).width() > 640) { $.get('path/to/html', function(data){ $('[role="complementary"]').append(data); }); }

Slide 84

Slide 84 text

Single Pager? Embed CSS and Scripts inline Use sprites and fonts Beware of base64 asset embedding

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

Solutions Features: Use, when certain that it's there! Implementation quality: Modern features should be an add-on Browser Speed: Less JavaScript dependent content Memory: Optimize Images, reduce Image Footprint Resolution: See above, use SVG, use Responsive Images! Connection speed: Fear for worst, reduce requests!

Slide 87

Slide 87 text

Solutions Features: Progressive Enhancement Implementation quality: Progressive Enhancement Browser Speed: Progressive Enhancement Memory: Progressive Enhancement Resolution: Progressive Enhancement Connection speed: Progressive Enhancement

Slide 88

Slide 88 text

Embrace Progressive Enhancement

Slide 89

Slide 89 text

Progressive Enhancement Take care of your content - Provide a solid HTML base Present your content - Add robust and future friendly CSS Enhance behaviour by adding JavaScript

Slide 90

Slide 90 text

Help yourself with tooling

Slide 91

Slide 91 text

Detect Code Smells

Slide 92

Slide 92 text

HTML Code Smells DiagnostiCSS Revenge.css Troll.css

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

Grunt Task Runner Automaticall create PNG fallbacks (Grunticon) Insert debug CSS files during development Minify, compile, reduce sources Execute ImageOptim and SVGO ...

Slide 95

Slide 95 text

Why Progressive Enhancement

Slide 96

Slide 96 text

Not only for the old things we know

Slide 97

Slide 97 text

But also for the uncertainty of the future!

Slide 98

Slide 98 text

workingdraft.de/135

Slide 99

Slide 99 text

workingdraft.de/137

Slide 100

Slide 100 text

Create the most amazing food... ... by choosing the right ingredients

Slide 101

Slide 101 text

THX @ddprrt • fettblog.eu • workingdraft.de

Slide 102

Slide 102 text

No content