Slide 1

Slide 1 text

Pushing the boundaries without Breaking the Web Rachel Andrew: ConFoo February 2013 Wednesday, 27 February 13

Slide 2

Slide 2 text

Wednesday, 27 February 13

Slide 3

Slide 3 text

Pushing the boundaries without Breaking the Web Rachel Andrew: ConFoo February 2013 Wednesday, 27 February 13

Slide 4

Slide 4 text

a History Lesson Wednesday, 27 February 13

Slide 5

Slide 5 text

<!-- function MM_reloadPage(init) { if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> Wednesday, 27 February 13

Slide 6

Slide 6 text

Wednesday, 27 February 13

Slide 7

Slide 7 text

Things used by people who understand the problems they solve are also used by those who do not understand those problems, or even if there is a problem. Wednesday, 27 February 13

Slide 8

Slide 8 text

This is an amazing time to be a web developer. Wednesday, 27 February 13

Slide 9

Slide 9 text

Wednesday, 27 February 13

Slide 10

Slide 10 text

Wednesday, 27 February 13

Slide 11

Slide 11 text

Frustration Wednesday, 27 February 13

Slide 12

Slide 12 text

The web is a work in progress. Your job? To deal with it. Wednesday, 27 February 13

Slide 13

Slide 13 text

Making things better Wednesday, 27 February 13

Slide 14

Slide 14 text

Wednesday, 27 February 13

Slide 15

Slide 15 text

You now have two problems Wednesday, 27 February 13

Slide 16

Slide 16 text

Wednesday, 27 February 13

Slide 17

Slide 17 text

The state of play in December 2011. Wednesday, 27 February 13

Slide 18

Slide 18 text

December 2011: greenbelt.org.uk Wednesday, 27 February 13

Slide 19

Slide 19 text

Understanding the technology your audience is using gives you a point of reference for your decisions. Wednesday, 27 February 13

Slide 20

Slide 20 text

Our approach: mobile first responsive design Wednesday, 27 February 13

Slide 21

Slide 21 text

Wednesday, 27 February 13

Slide 22

Slide 22 text

Wednesday, 27 February 13

Slide 23

Slide 23 text

Problem: no media query support in IE8 and below. Wednesday, 27 February 13

Slide 24

Slide 24 text

No media query support Wednesday, 27 February 13

Slide 25

Slide 25 text

Option 1: serve these users the mobile version of the site only Wednesday, 27 February 13

Slide 26

Slide 26 text

Option 2: Use respond.js to polyfill media query support Wednesday, 27 February 13

Slide 27

Slide 27 text

Option 3: Offer a fixed width version of the site to IE8 and below Wednesday, 27 February 13

Slide 28

Slide 28 text

Wednesday, 27 February 13

Slide 29

Slide 29 text

Problem: lack of support for styling HTML5 semantic elements in older browsers. Wednesday, 27 February 13

Slide 30

Slide 30 text

No support for HTML5 semantic elements Wednesday, 27 February 13

Slide 31

Slide 31 text

Option 1: use the JavaScript polyfill html5.js to add support via JavaScript Wednesday, 27 February 13

Slide 32

Slide 32 text

Option 2: avoid using HTML5 semantic elements in the templates until IE8 usage declines Wednesday, 27 February 13

Slide 33

Slide 33 text

Replacing divs with semantic elements later is trivial due to our template based CMS. Wednesday, 27 February 13

Slide 34

Slide 34 text

We (edgeofmyseat.com) are retained to maintain & develop the site. We can make these changes when old browser usage reduces. Wednesday, 27 February 13

Slide 35

Slide 35 text

Your mileage (and situation) may vary. Wednesday, 27 February 13

Slide 36

Slide 36 text

Avoiding using the tag in your selectors means you can switch tags in your templates without changing your CSS. Wednesday, 27 February 13

Slide 37

Slide 37 text

Problem: lack of support for certain CSS3 Selectors in older browsers. Wednesday, 27 February 13

Slide 38

Slide 38 text

No support for nth-child Wednesday, 27 February 13

Slide 39

Slide 39 text

Option1: do nothing Wednesday, 27 February 13

Slide 40

Slide 40 text

Option 2: polyfill with Selectivizr Wednesday, 27 February 13

Slide 41

Slide 41 text

Option 3: fix each selector in your own JavaScript Wednesday, 27 February 13

Slide 42

Slide 42 text

My decision to fix the width for older browsers also made polyfilling CSS3 selectors much easier. Wednesday, 27 February 13

Slide 43

Slide 43 text

Problem: no clear solution for Responsive Images Wednesday, 27 February 13

Slide 44

Slide 44 text

Solution: put in place technology that will enable us to adopt a solution later Wednesday, 27 February 13

Slide 45

Slide 45 text

Responsive Images Community Group http://www.w3.org/community/respimg/ Wednesday, 27 February 13

Slide 46

Slide 46 text

In February 2013 browser use on the site without support for these modern technologies has fallen to under 8% Wednesday, 27 February 13

Slide 47

Slide 47 text

1. What is the problem? My process 2. What are my constraints? 3. Is not supporting this feature an option? 4. What current solutions exist? 5. Use a polyfill or roll my own? Wednesday, 27 February 13

Slide 48

Slide 48 text

May 2012: grabaperch.com Wednesday, 27 February 13

Slide 49

Slide 49 text

How many users of the Perch website do not have support for the modern web technologies we want to use? Wednesday, 27 February 13

Slide 50

Slide 50 text

May 2012: grabaperch.com Wednesday, 27 February 13

Slide 51

Slide 51 text

Wednesday, 27 February 13

Slide 52

Slide 52 text

I use more polyfills when I have fewer older browser users. The downsides are going to be an issue to a much smaller % Wednesday, 27 February 13

Slide 53

Slide 53 text

Why not just use a boilerplate? Wednesday, 27 February 13

Slide 54

Slide 54 text

Wednesday, 27 February 13

Slide 55

Slide 55 text

Stop solving problems you don’t yet have Wednesday, 27 February 13

Slide 56

Slide 56 text

If you don’t know what it is doing. Why is it there? Wednesday, 27 February 13

Slide 57

Slide 57 text

What happens if any part does not load? Wednesday, 27 February 13

Slide 58

Slide 58 text

Do you know what is safe to delete? Wednesday, 27 February 13

Slide 59

Slide 59 text

Starting with the bare minimum and adding things forces you to consider the implications of each thing you add. Wednesday, 27 February 13

Slide 60

Slide 60 text

There’s no silver bullet to making a slow site fast. You must take a holistic approach. High performance runs the entire way through from the hardware it’s hosted on, through the app that builds the pages, to the server software that delivers the pages and the front end code that displays them in a browser. Drew McLellan - http://allinthehead.com/retro/361/how-to-make-your-website-fast Wednesday, 27 February 13

Slide 61

Slide 61 text

Web pages are getting larger and a lot of the size is down to JavaScript. http://royal.pingdom.com/2011/11/21/web-pages-getting-bloated-here-is-why/ Wednesday, 27 February 13

Slide 62

Slide 62 text

Size Matters Wednesday, 27 February 13

Slide 63

Slide 63 text

Wednesday, 27 February 13

Slide 64

Slide 64 text

Wednesday, 27 February 13

Slide 65

Slide 65 text

Wednesday, 27 February 13

Slide 66

Slide 66 text

We are all learners and we are all teachers... Wednesday, 27 February 13

Slide 67

Slide 67 text

... no matter how old we are, how long we have been doing this, and whether we write tutorials or speak at conferences or not. Wednesday, 27 February 13

Slide 68

Slide 68 text

Polyfills should not be a black box Wednesday, 27 February 13

Slide 69

Slide 69 text

Teach problem solving before polyfilling. Wednesday, 27 February 13

Slide 70

Slide 70 text

Wednesday, 27 February 13

Slide 71

Slide 71 text

“Perch is removing my paragraphs” Wednesday, 27 February 13

Slide 72

Slide 72 text

We need to teach: HTML, CSS, JavaScript Wednesday, 27 February 13

Slide 73

Slide 73 text

We need to teach: Problem Solving skills Wednesday, 27 February 13

Slide 74

Slide 74 text

Wednesday, 27 February 13

Slide 75

Slide 75 text

If we train people to just copy and paste, we stop them growing, learning and contributing. Wednesday, 27 February 13

Slide 76

Slide 76 text

Make sure you know why you are using a solution and what your other options are. Wednesday, 27 February 13

Slide 77

Slide 77 text

Know and test for what happens if JavaScript doesn’t load. Wednesday, 27 February 13

Slide 78

Slide 78 text

Build solutions that are flexible for future changes in best practice. Wednesday, 27 February 13

Slide 79

Slide 79 text

When teaching or writing tutorials for others explain problems before handing out the solution. Explain why as well as how. Wednesday, 27 February 13

Slide 80

Slide 80 text

Thank you. Slides: http://www.rachelandrew.co.uk/presentations/ pushing-the-boundaries @rachelandrew http://rachelandrew.co.uk http://grabaperch.com http://edgeofmyseat.com Wednesday, 27 February 13