Slide 1

Slide 1 text

— by Hannah Wolfe — THE LONG ROAD TO 1.0 A story of life, love and the pursuit of 100% test coverage

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No matter what people tell you, words and ideas can change the world – Robin Williams

Slide 4

Slide 4 text

FOCUSED PUBLISHING PLATFORM

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Seth Godin - Purple Cow / Tribes Jeff Atwood - Founder @ StackOverflow Darren Rowse - ProBlogger Leo Babauta - Zen Habits Paul Bradshaw - Head of HE Journalism (UK) Tucker Max - I Hope They Serve Beer in Hell (that’s about €230k)

Slide 7

Slide 7 text

FUTURE OF JOURNALISM

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Easy to install

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Not for profit Money © 2014 Aaron Patterson, Flickr

Slide 12

Slide 12 text

Sustainable

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

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Ghost 1.0

Slide 20

Slide 20 text

CHALLENGES

Slide 21

Slide 21 text

To t CLIENT vs SERVER breaking that coupling

Slide 22

Slide 22 text

JSON API Server Blog require() Client Admin HTTP

Slide 23

Slide 23 text

JSON API Server Blog require() Client Admin HTTP

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

JSON API Server Blog require() Client Admin HTTP

Slide 26

Slide 26 text

JSON API Server Blog require() Client Admin HTTP

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

JSON API Server Blog require() Client Admin HTTP

Slide 29

Slide 29 text

JSON API Server Blog require() Client Admin HTTP

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

JSON API Server Blog require() Client Admin HTTP

Slide 32

Slide 32 text

JSON API Server Blog require() Client Admin HTTP GET /api/posts/?limit=3 api.posts.browse({limit: 3}) {{#get “posts” limit=“3”}}

Slide 33

Slide 33 text

JSON API Server Blog require() Client Admin HTTP

Slide 34

Slide 34 text

JSON API Server Blog require() Client Admin HTTP ?

Slide 35

Slide 35 text

JSON API Server Blog require() Client Admin HTTP ?

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Single page app? Ugly routing No data binding Memory issues Constant regressions Poor mobile support

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Lacking a clear consistent approach

Slide 41

Slide 41 text

We needed a RULEBOOK

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

JSON API Server Blog require() Client Admin HTTP ?

Slide 45

Slide 45 text

JSON API Server Blog require() Client Admin HTTP

Slide 46

Slide 46 text

Ghost 1.0

Slide 47

Slide 47 text

JSON API Server Blog require() Client Admin HTTP

Slide 48

Slide 48 text

JSON API Server Blog require() Client Admin HTTP

Slide 49

Slide 49 text

On the shoulders of giants

Slide 50

Slide 50 text

DATABASES the rule of three

Slide 51

Slide 51 text

bookshelf & knex

Slide 52

Slide 52 text

Easy to install

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

POSTGRES SUPPORT

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

Slide 58

Slide 58 text

Slide 59

Slide 59 text

Easy to install

Slide 60

Slide 60 text

9414 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build` 9414 verbose stack Exit status 1 9414 verbose stack at EventEmitter. (/root/.nvm/versions/node/v4.2.6/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) 9414 verbose stack at emitTwo (events.js:87:13) 9414 verbose stack at EventEmitter.emit (events.js:172:7) 9414 verbose stack at ChildProcess. (/root/.nvm/versions/node/v4.2.6/lib/node_modules/npm/lib/utils/spawn.js:40:14) 9414 verbose stack at emitTwo (events.js:87:13) 9414 verbose stack at ChildProcess.emit (events.js:172:7) 9414 verbose stack at maybeClose (internal/child_process.js:821:16) 9414 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 9415 verbose pkgid [email protected] 9416 verbose cwd /var/www/ghost 9417 error Linux 3.2.0-76-virtual 9418 error argv "/root/.nvm/versions/node/v4.2.6/bin/node" "/root/.nvm/versions/node/v4.2.6/bin/npm" "install" "sqlite3" "--loglevel=info" 9419 error node v4.2.6 9420 error npm v4.1.1 9421 error code ELIFECYCLE 9422 error [email protected] install: `node-pre-gyp install --fallback-to-build` 9422 error Exit status 1 9423 error Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'. 9423 error Make sure you have the latest version of node.js and npm installed. 9423 error If you do, this is most likely a problem with the sqlite3 package, 9423 error not with npm itself. 9423 error Tell the author that this fails on your system: 9423 error node-pre-gyp install --fallback-to-build 9423 error You can get information on how to open an issue for this project with: 9423 error npm bugs sqlite3 9423 error Or if that isn't available, you can get their info via: 9423 error npm owner ls sqlite3 9423 error There is likely additional logging output above. 9424 verbose exit [ 1, true ]

Slide 61

Slide 61 text

Slide 62

Slide 62 text

MIGRATIONS

Slide 63

Slide 63 text

Ghost 1.0

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

$> ghost install $> ghost install local Easy to install

Slide 67

Slide 67 text

And some stuff EXPRESS APP STRUCTURE Or… wait… where does middleware go?

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

Ghost 0.3 - MVC

Slide 70

Slide 70 text

app.get('/about/', function myController(req, res) { var myModelData = models.get('about'); // render the view called about.hbs res.render('about', myModelData); });

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

Ghost 1.0

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

// API parentApp.use('/ghost/api/v0.1/', require('./api')()); // ADMIN parentApp.use('/ghost', require('./admin')()); // BLOG parentApp.use(require('./blog')());

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

Solve real problems first, DRY later more use cases result in better abstractions

Slide 81

Slide 81 text

Break files into packages as they get too complex (but not before)

Slide 82

Slide 82 text

Use index.js to expose Public APIs avoid tight coupling & circular dependencies

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

CHALLENGES

Slide 85

Slide 85 text

PERMISSIONS

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

Why can authors publish posts?

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

Ghost 1.0

Slide 90

Slide 90 text

Ghost 1.0 • New Editor • CLI Tool for install & upgrade • Ghost OAuth login system • Improved logging & migrations • Much, much more…

Slide 91

Slide 91 text

WHAT NEXT?

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

Thank you!