QCon London The business of front-end development. "This is - - PowerPoint PPT Presentation

qcon london
SMART_READER_LITE
LIVE PREVIEW

QCon London The business of front-end development. "This is - - PowerPoint PPT Presentation

QCon London The business of front-end development. "This is for Everyone" by Nick Webb - Flickr: DSC_3232. Licensed under CC BY 2.0 via Wikimedia Commons -


slide-1
SLIDE 1

QCon London

The business of front-end development.

"This is for Everyone" by Nick Webb - Flickr: DSC_3232. Licensed under CC BY 2.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:This_is_for_Everyone.jpg#mediaviewer/File:This_is_for_Everyone.jpg

slide-2
SLIDE 2

Rachel Andrew

Managing Director of edgeofmyseat.com Web developer, writer and speaker Find me at rachelandrew.co.uk On Twitter: @rachelandrew

slide-3
SLIDE 3

grabaperch.com

slide-4
SLIDE 4

The web is an accessible medium. We can protect that, or we can break it. I choose to protect it.

slide-5
SLIDE 5

My tasks include …

  • bookkeeping
  • completing baffling

forms from the government

  • writing Puppet

Manifests

  • coding PHP
  • writing

documentation

  • writing and giving

presentations & workshops

  • front-end

development

slide-6
SLIDE 6

I ship.

slide-7
SLIDE 7
slide-8
SLIDE 8

http://www.ironspider.ca/adv/basic_css/whyusecss.htm

slide-9
SLIDE 9

The “Netscape Resize Fix”

<script type="text/javascript"> <!-- function MM_reloadPage(init) { if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(ap pVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;

  • nresize=MM_reloadPage; }}

else if (innerWidth! =document.MM_pgW || innerHeight! =document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script>

slide-10
SLIDE 10

Front-end developer circa 2005? Browser bugs expert.

slide-11
SLIDE 11

http://archive.webstandards.org/mission.html

slide-12
SLIDE 12

http://www.webstandards.org/2013/03/01/our-work-here-is-done/

“Thanks to the hard work of countless WaSP members and supporters (like you), Tim Berners- Lee’s vision of the web as an open, accessible, and universal community is largely the reality. While there is still work to be done, the sting of the WaSP is no longer necessary. And so it is time for us to close down The Web Standards Project.”

slide-13
SLIDE 13

Browser vendors are implementing standard things in a standard way.

slide-14
SLIDE 14

Innovation happens through the standards process.

slide-15
SLIDE 15

Showstopping browser bugs when doing straightforward things in modern browsers are rare.

slide-16
SLIDE 16

http://www.allenpike.com/2015/javascript-framework-fatigue/

“Studies show that a todo list is the most complex JavaScript app you can build before a newer, better framework is invented.”

slide-17
SLIDE 17

We’re creating complexity.

slide-18
SLIDE 18

Hiding the simple languages of the web behind tooling and process.

slide-19
SLIDE 19
slide-20
SLIDE 20

Replacing divs …

<div class="header"> <h1>My website</h1> <div class="nav"> </div> </div> <div class="article"> </div> <div class="sidebar"> </div> <div class="footer"> </div>

slide-21
SLIDE 21

… with new semantic elements.

<header> <h1>My website</h1> <nav> </nav> </header> <article> </article> <aside> </aside> <footer> </footer>

slide-22
SLIDE 22

Web Video Text Tracks Format (WebVTT)

WEBVTT 1 00:00:22.230 --> 00:00:24.606 This is the first subtitle. 2 00:00:30.739 --> 00:00:34.074 This is the second. 3 00:00:34.159 --> 00:00:35.743 Third

slide-23
SLIDE 23

Web Video Text Tracks Format (WebVTT)

WEBVTT 1 00:00:22.230 --> 00:00:24.606 This is the first subtitle. 2 00:00:30.739 --> 00:00:34.074 This is the second. 3 00:00:34.159 --> 00:00:35.743 Third

https://developer.mozilla.org/en/docs/ Web/API/Web_Video_Text_Tracks_Format

slide-24
SLIDE 24

http://robertnyman.com/html5/forms/input-types.html

slide-25
SLIDE 25

http://caniuse.com/#feat=css-sel3

slide-26
SLIDE 26

Time-dimensional Pseudo-classes :current :past :future

:current(p, li, dt, dd) { background: yellow; } :past(p, li, dt, dd) { background: transparent; color: #999999; }

slide-27
SLIDE 27

http://philipwalton.github.io/solved-by-flexbox/

slide-28
SLIDE 28

gridbyexample.com

slide-29
SLIDE 29

CSS Grid Layout

<div class="wrapper"> <div class="header">Header</div> <div class="sidebar">Sidebar</div> <div class="content">Content</div> </div>

slide-30
SLIDE 30

CSS Grid Layout

.sidebar { grid-area: sidebar; } .content { grid-area: content; } .header { grid-area: header; } .wrapper { display: grid; grid-template-columns: 100px 10px 100px 10px 100px; grid-template-rows: auto; grid-template-areas: "header header header header header" "sidebar . content content content"; }

slide-31
SLIDE 31
slide-32
SLIDE 32

gridbyexample.com

slide-33
SLIDE 33

via my inbox.

“I’ll take a look if you create a Sass Mixin …”

slide-34
SLIDE 34

Emerging specifications like Grid remove the need for some of the pre-processing

slide-35
SLIDE 35

http://susy.oddbird.net/

slide-36
SLIDE 36

http://www.zell-weekeat.com/susy2-tutorial/

slide-37
SLIDE 37

Using the Susy Mixins.

.ag1 { @include span(2 of 10); } .ag2 { @include span(6 of 10); @include clearfix; } .ag3 { @include span(2 of 10 last); }

slide-38
SLIDE 38
slide-39
SLIDE 39

Grid Layout lets you place elements on the Grid without calculations.

/* declare a grid and set up a 10 column grid with gutters */ .container { width: 90%; margin: 0 auto 0 auto; display: grid; grid-template-columns: (col ) 4.25fr repeat(9, (gutter) 1fr (col) 4.25fr ) (gutter); grid-template-rows: auto repeat(5, 100px); } /* boxes positioned like so */ /* heading in row 1 full width */ h1 { grid-column: col / span col 10; grid-row: 1 / 2; } /* left hand sidebar */ .ag1 { grid-column: col / span gutter 2; grid-row: 2 / 3; }

slide-40
SLIDE 40

Web designers and developers should be excited by specifications like grid. This is the future.

slide-41
SLIDE 41

By leaning on frameworks, are we masking the issues?

slide-42
SLIDE 42

Working with the specifications we can contribute to improving them

slide-43
SLIDE 43

Sheer frustration drove much of the Web Standards movement.

slide-44
SLIDE 44

My fear is that due to our reliance

  • n frameworks we will stop

pushing for better solutions.

slide-45
SLIDE 45

https://twitter.com/codepo8/status/572783496550359040

slide-46
SLIDE 46

There are always compromises. They shouldn’t be the same for every project.

slide-47
SLIDE 47

Standardising on tools should not be at the expense of learning HTML, CSS and JavaScript.

slide-48
SLIDE 48

Use your tools and frameworks

  • lightly. Be ready to put them aside

when they don’t suit a project.

slide-49
SLIDE 49

Don’t become an expert in one brand of hammer. Become a master

  • carpenter. Develop timeless skills.
slide-50
SLIDE 50

Considerations when choosing tools and processes.

slide-51
SLIDE 51

https://css-tricks.com

slide-52
SLIDE 52

Is it responsible to use a brand new framework on a site you will complete then hand over?

slide-53
SLIDE 53

Large teams and in-house projects

  • ften require more process than

projects built by one or two people.

slide-54
SLIDE 54

Who is the audience?

  • Internal or External?
  • Can we make any assumptions about

technology used to access?

slide-55
SLIDE 55

What browsers and devices are currently used to access the site?

slide-56
SLIDE 56

What time do we have available?

slide-57
SLIDE 57

Whose time are we saving?

slide-58
SLIDE 58

http://aaron-gustafson.com/notebook/who-should-pay/

“When I look around, I see our community spending a lot of time coming up with new tools and techniques to make our jobs easier. To ship faster. And it’s not that I’m against efficiency, but I think we need to consider the implications of our decisions. And if one

  • f those implications is making our users suffer—or

potentially suffer—in order to make our lives easier, I think we need to consider their needs above our own.”

slide-59
SLIDE 59

We Are Social: http://wearesocial.net/blog/2015/01/digital-social-mobile-worldwide-2015/

slide-60
SLIDE 60

Will this tool …

  • Save me time?
  • Cause accessibility issues?
  • Slow the site down on mobile?
  • Limit the user agents that will be able to use

the core experience?

slide-61
SLIDE 61

It’s only temporary …

slide-62
SLIDE 62

This is for everyone

"This is for Everyone" by Nick Webb - Flickr: DSC_3232. Licensed under CC BY 2.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:This_is_for_Everyone.jpg#mediaviewer/File:This_is_for_Everyone.jpg

slide-63
SLIDE 63

Progressive enhancement

slide-64
SLIDE 64

http://www.bbc.co.uk/guidelines/futuremedia/accessibility/ html/progressive-enhancement.shtml

“a robust site or application in the more traditional sense minimises its

  • dependencies. The minimum

dependency for a web site should be an internet connection and the ability to parse HTML.”

slide-65
SLIDE 65

Start with the core experience

slide-66
SLIDE 66

What is the minimum that I need to ship? How can I ensure that minimum protects the core experience for everyone?

slide-67
SLIDE 67

We ship. We iterate.

slide-68
SLIDE 68

grabaperch.com

slide-69
SLIDE 69
slide-70
SLIDE 70

How to integrate third party code

slide-71
SLIDE 71

Not Invented Here

slide-72
SLIDE 72

http://mortoray.com/2015/02/25/invented-here-syndrome/

“Are you afraid to write code? Does the thought linger in your brain that somewhere out there somebody has already done this? Do you find yourself trapped in an analysis cycle where nothing is getting done? Is your product mutating to accommodate third party components? If yes, then perhaps you are suffering from invented-here syndrome.”

slide-73
SLIDE 73

Avoid turning shortcuts and third party code into dependencies.

slide-74
SLIDE 74

Dependency Inversion

slide-75
SLIDE 75

http://www.objectmentor.com/resources/articles/dip.pdf

“High level modules should not depend upon low-level modules. Both should depend upon abstractions. Abstractions should never depend upon

  • details. Details should depend upon

abstractions.”

slide-76
SLIDE 76

http://susy.oddbird.net/

slide-77
SLIDE 77

Progressively enhanced UI

  • JavaScript implementation based on the

regular HTML5 Video element

  • Static maps that become draggable and

zoomable - avoiding creating a dependency on

  • ne maps provider or library
  • Ordering items via a form input - that become

drag and drop if the user has JavaScript

slide-78
SLIDE 78

You can’t do everything. 
 You can do something.

slide-79
SLIDE 79

http://sixtwothree.org/posts/the-practical-case-for- progressive-enhancement

“A 100% pure progressively-enhanced website may not be practical on every single project you will ever encounter. While that sort of purity can exist, it’s unlikely in many business

  • scenarios. Budgets, timelines: these things
  • exist. Progressive enhancement isn’t a zero

sum game; it’s a continuum, just like the Web.”

slide-80
SLIDE 80
  • Learn (and teach!) core skills. HTML, CSS,

JavaScript

  • Maintain an interest in emerging specifications
  • Take care that you are not clinging to outdated
  • r unhelpful abstractions
  • We are no longer browser bug wranglers,

instead we should be experts in performance especially as the web becomes ever more mobile

slide-81
SLIDE 81
  • Choose your tools and frameworks on a case

by case basis

  • Understand the compromises
  • Don’t reinvent wheels …
  • … but beware “invented here syndrome”
  • Use progressive enhancement to protect the

core experience while shipping quickly, build from there.

slide-82
SLIDE 82

We get to create products that people see, touch & interact with.

slide-83
SLIDE 83

George Bernard Shaw

“We don’t stop playing because we grow old; we grow old because we stop playing”

slide-84
SLIDE 84

Thank you!

Rachel Andrew @rachelandrew http://rachelandrew.co.uk/presentations/business-of-front-end