Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ConFoo: Pushing the Boundaries without Breaking the Web

Rachel Andrew
February 27, 2013

ConFoo: Pushing the Boundaries without Breaking the Web

Rachel Andrew

February 27, 2013
Tweet

More Decks by Rachel Andrew

Other Decks in Technology

Transcript

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

    View full-size slide

  2. Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

  4. a History Lesson
    Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

  6. Wednesday, 27 February 13

    View full-size slide

  7. 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

    View full-size slide

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

    View full-size slide

  9. Wednesday, 27 February 13

    View full-size slide

  10. Wednesday, 27 February 13

    View full-size slide

  11. Frustration
    Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

  13. Making things better
    Wednesday, 27 February 13

    View full-size slide

  14. Wednesday, 27 February 13

    View full-size slide

  15. You now have
    two problems
    Wednesday, 27 February 13

    View full-size slide

  16. Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide






  21. Wednesday, 27 February 13

    View full-size slide

  22. Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

  24. No media query support
    Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  28. Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

  30. No support for HTML5 semantic elements
    Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  38. No support for nth-child
    Wednesday, 27 February 13

    View full-size slide

  39. Option1: do nothing
    Wednesday, 27 February 13

    View full-size slide

  40. Option 2: polyfill with Selectivizr
    Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  47. 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

    View full-size slide

  48. May 2012: grabaperch.com
    Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

  50. May 2012: grabaperch.com
    Wednesday, 27 February 13

    View full-size slide

  51. Wednesday, 27 February 13

    View full-size slide

  52. 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

    View full-size slide

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

    View full-size slide

  54. Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  60. 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

    View full-size slide

  61. 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

    View full-size slide

  62. Size Matters
    Wednesday, 27 February 13

    View full-size slide

  63. Wednesday, 27 February 13

    View full-size slide

  64. Wednesday, 27 February 13

    View full-size slide

  65. Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

  67. ... 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

    View full-size slide

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

    View full-size slide

  69. Teach problem solving
    before polyfilling.
    Wednesday, 27 February 13

    View full-size slide

  70. Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  74. Wednesday, 27 February 13

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  80. 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

    View full-size slide