Slide 1

Slide 1 text

tales adventures in node.js

Slide 2

Slide 2 text

@ErisDS on the Internet. I’m Hannah,

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Just a Blogging Platform

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Design-led Open source Nyantocat © 2014 GitHub Inc, All rights reserved

Slide 9

Slide 9 text

Free,  Open Source, Non Profit & Sustainable

Slide 10

Slide 10 text

The challenge

Slide 11

Slide 11 text

Dynamic admin, static(ish) blog

Slide 12

Slide 12 text

Great user experience

Slide 13

Slide 13 text

Simple install

Slide 14

Slide 14 text

Extensible

Slide 15

Slide 15 text

Why ?

Slide 16

Slide 16 text

Why not PHP?

Slide 17

Slide 17 text

Node.js is super fast

Slide 18

Slide 18 text

JavaScript

Slide 19

Slide 19 text

The Socialite © 2014 GitHub Inc, All rights reserved Javascript community & ecosystem

Slide 20

Slide 20 text

Node.js challenges

Slide 21

Slide 21 text

Hosting isn't straightforward

Slide 22

Slide 22 text

Less mature software

Slide 23

Slide 23 text

Lack of conventions

Slide 24

Slide 24 text

Choosing a data layer

Slide 25

Slide 25 text

Native binaries

Slide 26

Slide 26 text

Ghost architecture

Slide 27

Slide 27 text

JSON API Client Server Blog Database Admin

Slide 28

Slide 28 text

Database

Slide 29

Slide 29 text

Database

Slide 30

Slide 30 text

Database

Slide 31

Slide 31 text

Database Native Binaries

Slide 32

Slide 32 text

Database

Slide 33

Slide 33 text

JSON API Client Server Blog Admin SQLite MySQL PostgreSQL

Slide 34

Slide 34 text

SQLite MySQL PostgreSQL JSON API

Slide 35

Slide 35 text

SQLite MySQL PostgreSQL JSON API Knex

Slide 36

Slide 36 text

SQLite MySQL PostgreSQL JSON API Knex Bookshelf

Slide 37

Slide 37 text

SQLite MySQL PostgreSQL JSON API Knex Bookshelf Models

Slide 38

Slide 38 text

SQLite MySQL PostgreSQL JSON API Knex Bookshelf Models Migration, Export Import

Slide 39

Slide 39 text

JSON API Client Server Blog Admin SQLite MySQL PostgreSQL Bookshelf & Knex

Slide 40

Slide 40 text

JSON API

Slide 41

Slide 41 text

JSON API Client HTTP GET /api/posts/

Slide 42

Slide 42 text

JSON API Client Server HTTP module() GET /api/posts/ api.posts.browse()

Slide 43

Slide 43 text

JSON API Client Server HTTP module() App.ghost App GET /api/posts/ api.posts.browse() api.posts.browse()

Slide 44

Slide 44 text

JSON API Client Server HTTP module() App.ghost App GET /api/posts/ api.posts.browse() api.posts.browse()

Slide 45

Slide 45 text

JSON API Client Server Blog Admin SQLite MySQL PostgreSQL Bookshelf & Knex HTTP module()

Slide 46

Slide 46 text

jsonapi.org

Slide 47

Slide 47 text

JSON API Client Server Blog Admin SQLite MySQL PostgreSQL Bookshelf & Knex HTTP module()

Slide 48

Slide 48 text

Server Blog Server

Slide 49

Slide 49 text

Server

Slide 50

Slide 50 text

JSON API Client Server Blog Admin SQLite MySQL PostgreSQL Bookshelf & Knex HTTP module() Express

Slide 51

Slide 51 text

Client

Slide 52

Slide 52 text

JSON API Client Server Blog Admin SQLite MySQL PostgreSQL Bookshelf & Knex HTTP module() Express Ember.js

Slide 53

Slide 53 text

JSON API Client Server Blog Admin SQLite MySQL PostgreSQL Bookshelf & Knex HTTP module() Express Ember.js Handlebars

Slide 54

Slide 54 text

Code structure

Slide 55

Slide 55 text

DocPad

Slide 56

Slide 56 text

JS Bin

Slide 57

Slide 57 text

NodeBB

Slide 58

Slide 58 text

Node-RED

Slide 59

Slide 59 text

Ghost

Slide 60

Slide 60 text

Ghost : core

Slide 61

Slide 61 text

Ghost : core : server

Slide 62

Slide 62 text

Ghost : core : client

Slide 63

Slide 63 text

Testing • Mocha - https://github.com/visionmedia/mocha • Should - https://github.com/visionmedia/should.js/ • Supertest - https://github.com/visionmedia/supertest • Rewire - https://github.com/jhnns/rewire

Slide 64

Slide 64 text

Is the future?

Slide 65

Slide 65 text

Get stuck in!

Slide 66

Slide 66 text

Visit Ghost.org Subscribe to the dev blog: dev.ghost.org

Slide 67

Slide 67 text

TryGhost/Ghost.git Find us on GitHub

Slide 68

Slide 68 text

Freenode #ghost Join our community in IRC #ghost

Slide 69

Slide 69 text

Hannah Wolfe @ErisDS | [email protected] | dev.ghost.org