Slide 1

Slide 1 text

node.js @philhawksworth Friday, 14 October 2011

Slide 2

Slide 2 text

node.js yet another talk on @philhawksworth Friday, 14 October 2011

Slide 3

Slide 3 text

node.js @philhawksworth Friday, 14 October 2011

Slide 4

Slide 4 text

node.js getting started @philhawksworth Friday, 14 October 2011

Slide 5

Slide 5 text

Friday, 14 October 2011

Slide 6

Slide 6 text

what we’ll look at Friday, 14 October 2011

Slide 7

Slide 7 text

what we’ll look at whaddizit? Friday, 14 October 2011

Slide 8

Slide 8 text

what we’ll look at whaddizit? installation options Friday, 14 October 2011

Slide 9

Slide 9 text

what we’ll look at whaddizit? installation options hello world Friday, 14 October 2011

Slide 10

Slide 10 text

what we’ll look at whaddizit? installation options hello world modules & frameworks Friday, 14 October 2011

Slide 11

Slide 11 text

what we’ll look at whaddizit? installation options hello world modules & frameworks deploying & hosting Friday, 14 October 2011

Slide 12

Slide 12 text

what we’ll look at whaddizit? installation options hello world modules & frameworks deploying & hosting comet and beyond Friday, 14 October 2011

Slide 13

Slide 13 text

Friday, 14 October 2011

Slide 14

Slide 14 text

assumptions Friday, 14 October 2011

Slide 15

Slide 15 text

assumptions web development experience Friday, 14 October 2011

Slide 16

Slide 16 text

assumptions web development experience javascript knowledge Friday, 14 October 2011

Slide 17

Slide 17 text

assumptions web development experience javascript knowledge unix, linux, osx Friday, 14 October 2011

Slide 18

Slide 18 text

assumptions web development experience javascript knowledge unix, linux, osx not a nodejs ninja Friday, 14 October 2011

Slide 19

Slide 19 text

Friday, 14 October 2011

Slide 20

Slide 20 text

whaddizit? Friday, 14 October 2011

Slide 21

Slide 21 text

Friday, 14 October 2011

Slide 22

Slide 22 text

Evented I/O for V8 Javascript Friday, 14 October 2011

Slide 23

Slide 23 text

evented i-what now? Friday, 14 October 2011

Slide 24

Slide 24 text

c++ evented i-what now? Friday, 14 October 2011

Slide 25

Slide 25 text

c++ v8 javascript engine evented i-what now? Friday, 14 October 2011

Slide 26

Slide 26 text

c++ v8 javascript engine server-side javascript evented i-what now? Friday, 14 October 2011

Slide 27

Slide 27 text

c++ v8 javascript engine server-side javascript single event loop evented i-what now? Friday, 14 October 2011

Slide 28

Slide 28 text

c++ v8 javascript engine server-side javascript single event loop non-blocking evented i-what now? Friday, 14 October 2011

Slide 29

Slide 29 text

useful knowledge Friday, 14 October 2011

Slide 30

Slide 30 text

strong javascript useful knowledge Friday, 14 October 2011

Slide 31

Slide 31 text

strong javascript jQuery patterns useful knowledge Friday, 14 October 2011

Slide 32

Slide 32 text

dangerous knowledge Friday, 14 October 2011

Slide 33

Slide 33 text

jQuery patterns dangerous knowledge Friday, 14 October 2011

Slide 34

Slide 34 text

considerations Friday, 14 October 2011

Slide 35

Slide 35 text

considerations how mature is it? Friday, 14 October 2011

Slide 36

Slide 36 text

considerations how mature is it? v0.0.1: early 2009, currently v.0.4.8 Friday, 14 October 2011

Slide 37

Slide 37 text

considerations how mature is it? v0.0.1: early 2009, currently v.0.4.8 who uses it? Friday, 14 October 2011

Slide 38

Slide 38 text

considerations how mature is it? v0.0.1: early 2009, currently v.0.4.8 who uses it? everyone is playing. Friday, 14 October 2011

Slide 39

Slide 39 text

Friday, 14 October 2011

Slide 40

Slide 40 text

Friday, 14 October 2011

Slide 41

Slide 41 text

Friday, 14 October 2011

Slide 42

Slide 42 text

Friday, 14 October 2011

Slide 43

Slide 43 text

considerations how mature is it? v0.0.1: early 2009, currently v.0.4.8 who uses it? everyone is playing. Friday, 14 October 2011

Slide 44

Slide 44 text

considerations how mature is it? v0.0.1: early 2009, currently v.0.4.8 who uses it? everyone is playing. should I be scared of it? Friday, 14 October 2011

Slide 45

Slide 45 text

considerations how mature is it? v0.0.1: early 2009, currently v.0.4.8 who uses it? everyone is playing. should I be scared of it? no. but be cautious. Friday, 14 October 2011

Slide 46

Slide 46 text

ball-ache: Friday, 14 October 2011

Slide 47

Slide 47 text

ball-ache: stability Friday, 14 October 2011

Slide 48

Slide 48 text

ball-ache: stability rate of change Friday, 14 October 2011

Slide 49

Slide 49 text

installation options Friday, 14 October 2011

Slide 50

Slide 50 text

installation options build from source Friday, 14 October 2011

Slide 51

Slide 51 text

installation options build from source package Friday, 14 October 2011

Slide 52

Slide 52 text

installation options build from source package ndistro Friday, 14 October 2011

Slide 53

Slide 53 text

installation options build from source package ndistro n Friday, 14 October 2011

Slide 54

Slide 54 text

from source Friday, 14 October 2011

Slide 55

Slide 55 text

from source clone source from github Friday, 14 October 2011

Slide 56

Slide 56 text

from source clone source from github install dependancies Friday, 14 October 2011

Slide 57

Slide 57 text

from source clone source from github install dependancies xcode tools Friday, 14 October 2011

Slide 58

Slide 58 text

from source clone source from github install dependancies xcode tools configure, make, make install Friday, 14 October 2011

Slide 59

Slide 59 text

package Friday, 14 October 2011

Slide 60

Slide 60 text

Friday, 14 October 2011

Slide 61

Slide 61 text

Friday, 14 October 2011

Slide 62

Slide 62 text

ball-ache: stability rate of change Friday, 14 October 2011

Slide 63

Slide 63 text

many versions Friday, 14 October 2011

Slide 64

Slide 64 text

many versions many versions many versions many versions many versions Friday, 14 October 2011

Slide 65

Slide 65 text

many versions many versions many versions many versions many versions ndistro & n Friday, 14 October 2011

Slide 66

Slide 66 text

ndistro Friday, 14 October 2011

Slide 67

Slide 67 text

ndistro node distribution toolkit Friday, 14 October 2011

Slide 68

Slide 68 text

enables many versions of node Friday, 14 October 2011

Slide 69

Slide 69 text

http://github.com/visionmedia/ndistro Friday, 14 October 2011

Slide 70

Slide 70 text

http://github.com/visionmedia/ndistro Friday, 14 October 2011

Slide 71

Slide 71 text

http://github.com/visionmedia/ndistro Friday, 14 October 2011

Slide 72

Slide 72 text

Friday, 14 October 2011

Slide 73

Slide 73 text

Friday, 14 October 2011

Slide 74

Slide 74 text

Friday, 14 October 2011

Slide 75

Slide 75 text

Friday, 14 October 2011

Slide 76

Slide 76 text

Friday, 14 October 2011

Slide 77

Slide 77 text

Friday, 14 October 2011

Slide 78

Slide 78 text

Friday, 14 October 2011

Slide 79

Slide 79 text

local versions for each project Friday, 14 October 2011

Slide 80

Slide 80 text

n Friday, 14 October 2011

Slide 81

Slide 81 text

install as a module Friday, 14 October 2011

Slide 82

Slide 82 text

ball-ache Friday, 14 October 2011

Slide 83

Slide 83 text

ball-ache version stability Friday, 14 October 2011

Slide 84

Slide 84 text

ball-ache version stability module stability Friday, 14 October 2011

Slide 85

Slide 85 text

installing modules Friday, 14 October 2011

Slide 86

Slide 86 text

installing modules npm Friday, 14 October 2011

Slide 87

Slide 87 text

installing modules npm node package manager Friday, 14 October 2011

Slide 88

Slide 88 text

Friday, 14 October 2011

Slide 89

Slide 89 text

curl http://npmjs.org/install.sh | sh Friday, 14 October 2011

Slide 90

Slide 90 text

Friday, 14 October 2011

Slide 91

Slide 91 text

$ npm install Friday, 14 October 2011

Slide 92

Slide 92 text

$ npm install n Friday, 14 October 2011

Slide 93

Slide 93 text

$ npm install [email protected] Friday, 14 October 2011

Slide 94

Slide 94 text

$ npm ls Friday, 14 October 2011

Slide 95

Slide 95 text

Slide 96

Slide 96 text

Slide 97

Slide 97 text

$ npm update n Friday, 14 October 2011

Slide 98

Slide 98 text

$ npm install n Friday, 14 October 2011

Slide 99

Slide 99 text

$ npm update npm Friday, 14 October 2011

Slide 100

Slide 100 text

n Friday, 14 October 2011

Slide 101

Slide 101 text

while ndistro is for virtual environments Friday, 14 October 2011

Slide 102

Slide 102 text

while ndistro is for local environments Friday, 14 October 2011

Slide 103

Slide 103 text

n gives system wide node versioning Friday, 14 October 2011

Slide 104

Slide 104 text

$ n 0.2.6 $ n v0.3.3 Friday, 14 October 2011

Slide 105

Slide 105 text

download configure make install Friday, 14 October 2011

Slide 106

Slide 106 text

Friday, 14 October 2011

Slide 107

Slide 107 text

$ n ls Friday, 14 October 2011

Slide 108

Slide 108 text

$ n Friday, 14 October 2011

Slide 109

Slide 109 text

0.2.3 0.2.6 --debug 0.3.4 0.3.5 ο 0.4.8 Friday, 14 October 2011

Slide 110

Slide 110 text

$ n use 0.4.8 Friday, 14 October 2011

Slide 111

Slide 111 text

what we’ll look at whaddizit? installation options hello world modules & frameworks deploying & hosting comet and beyond Friday, 14 October 2011

Slide 112

Slide 112 text

hello world Friday, 14 October 2011

Slide 113

Slide 113 text

hello world app.js Friday, 14 October 2011

Slide 114

Slide 114 text

$ node app.js Friday, 14 October 2011

Slide 115

Slide 115 text

$ ./bin/node app.js Friday, 14 October 2011

Slide 116

Slide 116 text

$ n use 0.4.8 app.js Friday, 14 October 2011

Slide 117

Slide 117 text

Friday, 14 October 2011

Slide 118

Slide 118 text

frameworks Friday, 14 October 2011

Slide 119

Slide 119 text

frameworks get a little help Friday, 14 October 2011

Slide 120

Slide 120 text

frameworks get a little help uri routing Friday, 14 October 2011

Slide 121

Slide 121 text

frameworks get a little help uri routing content negotiation Friday, 14 October 2011

Slide 122

Slide 122 text

frameworks get a little help uri routing content negotiation templating Friday, 14 October 2011

Slide 123

Slide 123 text

frameworks get a little help uri routing content negotiation templating environment configuration Friday, 14 October 2011

Slide 124

Slide 124 text

express Friday, 14 October 2011

Slide 125

Slide 125 text

express the canonical web development framework Friday, 14 October 2011

Slide 126

Slide 126 text

express the canonical web development framework http://expressjs.com Friday, 14 October 2011

Slide 127

Slide 127 text

Friday, 14 October 2011

Slide 128

Slide 128 text

Friday, 14 October 2011

Slide 129

Slide 129 text

Friday, 14 October 2011

Slide 130

Slide 130 text

templating Friday, 14 October 2011

Slide 131

Slide 131 text

templating many ways to render your response Friday, 14 October 2011

Slide 132

Slide 132 text

Friday, 14 October 2011

Slide 133

Slide 133 text

Friday, 14 October 2011

Slide 134

Slide 134 text

bootstrapping Friday, 14 October 2011

Slide 135

Slide 135 text

bootstrapping quick scaffolding Friday, 14 October 2011

Slide 136

Slide 136 text

$ express --template --css --session Friday, 14 October 2011

Slide 137

Slide 137 text

Friday, 14 October 2011

Slide 138

Slide 138 text

$ n use 0.4.8 app.js Friday, 14 October 2011

Slide 139

Slide 139 text

Friday, 14 October 2011

Slide 140

Slide 140 text

Friday, 14 October 2011

Slide 141

Slide 141 text

Friday, 14 October 2011

Slide 142

Slide 142 text

deploying Friday, 14 October 2011

Slide 143

Slide 143 text

deploying where do I put this thing? Friday, 14 October 2011

Slide 144

Slide 144 text

deploying where do I put this thing? self-managed Friday, 14 October 2011

Slide 145

Slide 145 text

deploying where do I put this thing? self-managed amazon, linode, slicehost Friday, 14 October 2011

Slide 146

Slide 146 text

deploying where do I put this thing? self-managed amazon, linode, slicehost managed Friday, 14 October 2011

Slide 147

Slide 147 text

deploying where do I put this thing? self-managed amazon, linode, slicehost managed heroku, no.de Friday, 14 October 2011

Slide 148

Slide 148 text

Friday, 14 October 2011

Slide 149

Slide 149 text

Friday, 14 October 2011

Slide 150

Slide 150 text

Friday, 14 October 2011

Slide 151

Slide 151 text

Friday, 14 October 2011

Slide 152

Slide 152 text

duostack Friday, 14 October 2011

Slide 153

Slide 153 text

automated, git-based deployment duostack Friday, 14 October 2011

Slide 154

Slide 154 text

automated, git-based deployment install via npm duostack Friday, 14 October 2011

Slide 155

Slide 155 text

automated, git-based deployment install via npm manage dependancies via npm duostack Friday, 14 October 2011

Slide 156

Slide 156 text

automated, git-based deployment install via npm manage dependancies via npm limited versions of nodejs duostack Friday, 14 October 2011

Slide 157

Slide 157 text

hello world server.js Friday, 14 October 2011

Slide 158

Slide 158 text

$ git init $ git add $ git commit -m ‘1st commit’ Friday, 14 October 2011

Slide 159

Slide 159 text

$ duostack create nodedemo $ git push duostack master Friday, 14 October 2011

Slide 160

Slide 160 text

Delta compression using up to 2 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 416 bytes, done. Total 3 (delta 0), reused 0 (delta 0) ==== Duostack deploy received for nodedemo ==== Compiling app... done Compressed size is 4.0KB ==== Launching first instances.... done ==== App successfully deployed to ==== http://nodedemo.duostack.net Friday, 14 October 2011

Slide 161

Slide 161 text

Friday, 14 October 2011

Slide 162

Slide 162 text

Friday, 14 October 2011

Slide 163

Slide 163 text

self-managed Friday, 14 October 2011

Slide 164

Slide 164 text

self-managed amazon, linode, slicehost Friday, 14 October 2011

Slide 165

Slide 165 text

Friday, 14 October 2011

Slide 166

Slide 166 text

deploying Friday, 14 October 2011

Slide 167

Slide 167 text

deploying get it there Friday, 14 October 2011

Slide 168

Slide 168 text

deploying get it there git Friday, 14 October 2011

Slide 169

Slide 169 text

deploying get it there git configure it Friday, 14 October 2011

Slide 170

Slide 170 text

deploying get it there git configure it install dependencies Friday, 14 October 2011

Slide 171

Slide 171 text

deploying get it there git configure it install dependencies get it up, and keep it up Friday, 14 October 2011

Slide 172

Slide 172 text

deploying get it there git configure it install dependencies get it up, and keep it up upstart Friday, 14 October 2011

Slide 173

Slide 173 text

$ git clone project.git $ cd project $ ndistro Friday, 14 October 2011

Slide 174

Slide 174 text

ndistro is really just the shell Friday, 14 October 2011

Slide 175

Slide 175 text

replicates your environment Friday, 14 October 2011

Slide 176

Slide 176 text

keeping it up Friday, 14 October 2011

Slide 177

Slide 177 text

$ /etc/init.d/ Friday, 14 October 2011

Slide 178

Slide 178 text

http://upstart.ubuntu.com/ Friday, 14 October 2011

Slide 179

Slide 179 text

Friday, 14 October 2011

Slide 180

Slide 180 text

Friday, 14 October 2011

Slide 181

Slide 181 text

what we’ll look at whaddizit? installation options hello world modules & frameworks deploying & hosting comet and beyond Friday, 14 October 2011

Slide 182

Slide 182 text

easy comet requests websockets Friday, 14 October 2011

Slide 183

Slide 183 text

comet long-lived http requests Friday, 14 October 2011

Slide 184

Slide 184 text

Friday, 14 October 2011

Slide 185

Slide 185 text

Friday, 14 October 2011

Slide 186

Slide 186 text

Friday, 14 October 2011

Slide 187

Slide 187 text

Friday, 14 October 2011

Slide 188

Slide 188 text

javascript on the client Friday, 14 October 2011

Slide 189

Slide 189 text

javascript on the client asks, and listens Friday, 14 October 2011

Slide 190

Slide 190 text

javascript on the client asks, and listens asks again, or takes action Friday, 14 October 2011

Slide 191

Slide 191 text

websockets more efficient low latency comms Friday, 14 October 2011

Slide 192

Slide 192 text

supported in modern browsers Friday, 14 October 2011

Slide 193

Slide 193 text

Friday, 14 October 2011

Slide 194

Slide 194 text

Graceful degradation Friday, 14 October 2011

Slide 195

Slide 195 text

WebSocket Adobe Flash Socket Ajax long polling Ajax multipart streaming Forever Iframe JSONP Polling Friday, 14 October 2011

Slide 196

Slide 196 text

Friday, 14 October 2011

Slide 197

Slide 197 text

Friday, 14 October 2011

Slide 198

Slide 198 text

but... node is not just for realtime Friday, 14 October 2011

Slide 199

Slide 199 text

staying in the loop and finding out more Friday, 14 October 2011

Slide 200

Slide 200 text

github wiki github.com/joyent/node/wiki Friday, 14 October 2011

Slide 201

Slide 201 text

irc irc.freenode.net #node.js Friday, 14 October 2011

Slide 202

Slide 202 text

github wiki Friday, 14 October 2011

Slide 203

Slide 203 text

@ryah @tjholowaychuk @isaacs @sh1mmer Friday, 14 October 2011

Slide 204

Slide 204 text

ta! hawksworx.com @philhawksworth Friday, 14 October 2011