static sites can be the solution (simon wood)

103
@hpoom Static Sites Can be the Solution By Simon Wood London Web - July 2014 1

Upload: future-insights

Post on 08-May-2015

1.070 views

Category:

Documents


0 download

DESCRIPTION

Taken from this month's (17th July) London Web meet-up (http://londonweb.org) - we were joined by Simon Wood. Based in Kent, Simon is a passionate tech/geek and is currently Head of Technology and Innovation at the Shortbreaks and New Ventures division of Holiday Extras, a travel technology company. Simon is also acting CTO for miDrive an in-house Start Up incubator. Simon's session description for Static Sites Can be the Solution: "We build complex dynamic websites as a first port of call but these are slow, have issues with scaling and can be complex to host. I believe we should more often look to static sites first. I will demonstrate why static sites are such a good choice and show you how you can build static sites, using tools like Jekyll and other static site generators. We will cover how they can be hosted on S3 and GitHub pages and talk about how they can be frequently updated with the correct workflow even though they are static. You can have a blog on a static site and still make regular new blog posts and have dynamic content."

TRANSCRIPT

Page 1: Static Sites Can be the Solution (Simon Wood)

@hpoom

Static Sites Can be the SolutionBy Simon Wood London Web - July 2014

1

Page 2: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

About me

Head of Technology and Innovation

Holiday Extras

Simon Wood

2

Page 3: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Holiday Extras

3

Page 4: Static Sites Can be the Solution (Simon Wood)

/

@hpoom@hpoom 4

Page 5: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

What I am going to cover

5

Page 6: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Dynamic sites don’t work

What I am going to cover

5

Page 7: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Dynamic sites don’t work

Static SiteGenerators

What I am going to cover

5

Page 8: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Dynamic sites don’t work

Static SiteGenerators

Flat file CMS

What I am going to cover

5

Page 9: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Static does not mean static

Static Site != Static Content

6

Page 10: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Static does not mean static

Static Site == Static Architecture

7

Page 11: Static Sites Can be the Solution (Simon Wood)

@hpoom

Things are not working now

8

Page 12: Static Sites Can be the Solution (Simon Wood)

@hpoom

WordPress is used by more than 22%

of the top 10 million websites as of

August 2013Wikipedia

"WordPress Pencil and Pins-07" by Christopher Ross. Licensed under Creative Commons.- https://flic.kr/p/a688WQ9

Page 13: Static Sites Can be the Solution (Simon Wood)

@hpoom

Databasesdon’t scale

10

Page 14: Static Sites Can be the Solution (Simon Wood)

@hpoom

cache Queries

11

Page 15: Static Sites Can be the Solution (Simon Wood)

@hpoom

Front Side Cache

12

Page 16: Static Sites Can be the Solution (Simon Wood)

@hpoom

Some websites are fried up for the user every time. But others are

baked once and served up again and again.

Aaron Swartz

http://bit.ly/bake-fry

"Boston Wiki Meetup" by Sage Ross. Licensed under Creative Commons.- https://flic.kr/p/6QVV3613

Page 17: Static Sites Can be the Solution (Simon Wood)

@hpoom

WYSIWYGFAIL

14

Page 18: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Problems with CMS

15

Page 19: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Problems with CMS

Security15

Page 20: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Problems with CMS

PortabilitySecurity15

Page 21: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Problems with CMS

Portability ReliabilitySecurity15

Page 22: Static Sites Can be the Solution (Simon Wood)

@hpoom

The web hasEvolved

16

Page 23: Static Sites Can be the Solution (Simon Wood)

@hpoom

Site Speedis important

17

Page 24: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

500ms

Google

20%revenue

18

Page 25: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Amazon

100ms 1%revenue

19

Page 26: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Yahoo

400ms 9%traffic

20

Page 27: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Medium medium.com

Less is Less

Gov UKwww.gov.uk/transformation 21

Page 28: Static Sites Can be the Solution (Simon Wood)

@hpoom

The web's moved beyond the desktop, and it's not

looking back. The number of devices we're designing

for is growing just as quickly as mobile traffic.

Ethan Marcotte

"Device lab" by Jeremy Keith. Licensed under Creative Commons.- https://flic.kr/p/kj1Dm722

Page 29: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

CSS Pre-compilers

23

Page 30: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Javascript Proliferation

24

Page 31: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

good tooling

25

Page 32: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

client side Widgets

26

Page 33: Static Sites Can be the Solution (Simon Wood)

@hpoom

Static SiteGenerators

27

Page 34: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

History of SSG

28

Page 35: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

History of SSG

Moveable Type13 years old

28

Page 36: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

History of SSG

nanoc7 years old

Moveable Type13 years old

28

Page 37: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

History of SSG

nanoc7 years old

jekyll6 years old

Moveable Type13 years old

28

Page 38: Static Sites Can be the Solution (Simon Wood)

@hpoom

ExampleSSG Built Sites

29

Page 39: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Zurb Foundation assemblefoundation.zurb.com

30

Page 40: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Mozilla WebFWD Staceywebfwd.org

31

Page 41: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

GitHub Training Jekylltraining.github.com

32

Page 42: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

staticsitegenerators.net 287

33

Page 43: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

staticsitegenerators.net 287

33

Page 44: Static Sites Can be the Solution (Simon Wood)

/

@hpoom@hpoom 34

Page 45: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Lots of choice

assemble Cactus DocPad Dropplets

Hexo Hugo Hyde Jekyll metalsmith Middleman Octopress

Pelican Stacey Wintersmith

GO JavaScript PHP Python Ruby

35

Page 46: Static Sites Can be the Solution (Simon Wood)

@hpoom

Content

Templates

Sass

HTML

CSS

Publish

36

Page 47: Static Sites Can be the Solution (Simon Wood)

@hpoom

Markdown

37

Page 48: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Markdown is the future

"Markdown is the Future of Writing" by Robby Ingebretsen. - http://bit.ly/mdfuture

## A Little Markdown Example

Markdown is **awesome** because:

- it’s easy to *write*- it’s easy to *read*- it keeps you in the *moment*

A LITTLE MARKDOWN EXAMPLE

Markdown is awesome because:

• it’s easy to write• it’s easy to read• it keeps you in the moment

38

Page 49: Static Sites Can be the Solution (Simon Wood)

@hpoom

If your app has text fields that can be formatted, and

you're using your own janky custom markup instead of Markdown, you're doing it wrong.

Ernie Miller

"Old school (9/365)" by Jinny. Licensed under Creative Commons.- https://flic.kr/p/7uELQN39

Page 50: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

content is versioned

40

Page 51: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Web Editordillinger.io

Markdown Tools

Mac Editormouapp.com

Booksgitbook.io

41

Page 52: Static Sites Can be the Solution (Simon Wood)

@hpoom

FRONT MATTER

42

Page 53: Static Sites Can be the Solution (Simon Wood)

@hpoom

---layout: posttitle: Bloggling like a protags: ['baby', 'startup', 'prediction']created: '2014-03-17T22:24:18+00:00'---

*content goes here*

43

Page 54: Static Sites Can be the Solution (Simon Wood)

@hpoom

Templates

44

Page 55: Static Sites Can be the Solution (Simon Wood)

@hpoom

<!DOCTYPE html> <html lang ="en"> <head> <meta charset="UTF-8"> <title>{{title}}</title> </head> <body> {{content}} </body> </html>

45

Page 56: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Template Engines

Eco HamlHandlebars JadeMustache Twig

CoffeeScript JavaScript PHP Ruby

46

Page 57: Static Sites Can be the Solution (Simon Wood)

@hpoom

Pre-compilersand tooling

47

Page 58: Static Sites Can be the Solution (Simon Wood)

@hpoom

Hosting

48

Page 59: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

GitHub Pages

49

Page 60: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

AWS S3

50

Page 61: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

BitBalloon

51

Page 62: Static Sites Can be the Solution (Simon Wood)

@hpoom

Why somany?

52

Page 63: Static Sites Can be the Solution (Simon Wood)

@hpoom

I believe that writing a static site generator is

the new "Hello World". It is stupidly trivial to

write a basic one.Timo Zimmermann

http://bit.ly/ssghello

"printf("hello, world\n");" by isipeoria. Licensed under Creative Commons.- https://flic.kr/p/bcgZ5g53

Page 64: Static Sites Can be the Solution (Simon Wood)

@hpoom

ROLL YOUROWN SSG

54

Page 65: Static Sites Can be the Solution (Simon Wood)

@hpoom

Terminaldriven

55

Page 66: Static Sites Can be the Solution (Simon Wood)

@hpoom

Flat FileCMS

56

Page 67: Static Sites Can be the Solution (Simon Wood)

@hpoom

Example FlatFILE CMS Sites

57

Page 68: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

asana statamicasana.com

58

Page 69: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

World Backup Day Kirbyworldbackupday.com

59

Page 70: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Some Flat File CMS

Kirby statamicPico Stacey Cockpit

Monstra razorCMS60

Page 71: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

statamic

61

Page 72: Static Sites Can be the Solution (Simon Wood)

@hpoom

A flat-file CMS is a content management system that

stores content in files and folders rather than in a DB

like a traditional CMS

Jeremiah Shoafhttp://bit.ly/FlatCMS

"P1040010" by Mike Linksvayer. Licensed under Creative Commons.- https://flic.kr/p/dYKSNz62

Page 73: Static Sites Can be the Solution (Simon Wood)

@hpoom

Dynamic Elementswith Javascript

63

Page 74: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

My blog needs comments

64

Page 75: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

My blog needs comments

64

Page 76: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

My blog needs comments

64

Page 77: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

My blog needs comments

64

Page 78: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Bells & whistles

65

Page 79: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Bells & whistles

Surveys65

Page 80: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Bells & whistles

Surveys Video65

Page 81: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Bells & whistles

Surveys Video Charts65

Page 82: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Client side JS can do a lot

Web Sockets WebRTC Canvas WebGL Local Storage

Animation Video Audio Shadow DOM66

Page 83: Static Sites Can be the Solution (Simon Wood)

@hpoom

Summary

67

Page 84: Static Sites Can be the Solution (Simon Wood)

@hpoom

Where it isnot Suitable

68

Page 85: Static Sites Can be the Solution (Simon Wood)

@hpoom

Not non-tech accessible

69

Page 86: Static Sites Can be the Solution (Simon Wood)

@hpoom

not a solution to everything

70

Page 87: Static Sites Can be the Solution (Simon Wood)

@hpoom

Requiresa Rethink

71

Page 88: Static Sites Can be the Solution (Simon Wood)

@hpoom

Otheroptions

72

Page 89: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

I can’t change my CMS

73

Page 90: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Boost

I can’t change my CMS

73

Page 91: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Boost WP-Super Cache

I can’t change my CMS

73

Page 92: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Boost WP-Super Cache

I can’t change my CMS

Buster73

Page 93: Static Sites Can be the Solution (Simon Wood)

/

@hpoom

Mixturemixture.io

Alternatives

Hammerhammerformac.com

Cactuscactusformac.com

74

Page 94: Static Sites Can be the Solution (Simon Wood)

@hpoom

All else fails then VARNISH

75

Page 95: Static Sites Can be the Solution (Simon Wood)

@hpoom

The Benefits

76

Page 96: Static Sites Can be the Solution (Simon Wood)

@hpoom

SPEED

77

Page 97: Static Sites Can be the Solution (Simon Wood)

@hpoom

Security

78

Page 98: Static Sites Can be the Solution (Simon Wood)

@hpoom

Simple CheapHosting

79

Page 99: Static Sites Can be the Solution (Simon Wood)

@hpoom

RevisionControl

80

Page 100: Static Sites Can be the Solution (Simon Wood)

@hpoom

Portability

81

Page 101: Static Sites Can be the Solution (Simon Wood)

@hpoom

SIMPLICITY

82

Page 102: Static Sites Can be the Solution (Simon Wood)

@hpoom

Generate

once83

Page 103: Static Sites Can be the Solution (Simon Wood)

@hpoom

Thank youplease contact me if you have any questions

Twitter: @hpoomLinks: http://bit.ly/LW-July

logo

By Simon Wood London Web - July 2014

84