Upload
fitc
View
765
Download
2
Embed Size (px)
DESCRIPTION
Presented at FITC Toronto 2014 on April 27-29, 2014 This high-level introduction to Node.js gives the casual JavaScript developer everything they need to start building web applications, JSON APIs, network servers and more. Let Derek Watson, tech lead at The Working Group, veteran developer and JavaScript fanatic share key insights into this exciting new platform.
Citation preview
Intro to Node.js Derek Watson
Mar 29, 2014
Story time!
JavaScript
Pretty cool language #javascript
The Working Group
Software shop @twg
Derek Watson
Developer guy @dcwca
and me
what is it good for?
What is node good for?
• JSON APIs
#twg@twg
What is node good for?
• JSON APIs
• Network servers
#twg@twg
What is node good for?
• JSON APIs
• Network servers
• Realtime web applications
#twg@twg
!
MODULES
everything is a module
Modules everywhere
• Your .js files are modules
• Libraries you use are modules
• Your whole app is one big module
#twg@twg
doge.js: An example module
#twg@twg
doge.js
program.js
Try it out!
“The main thing that distinguishes legacy code is a lack of tests.”
- Michael Feathers
test/doge.js
test/doge.js
test/doge.js
server.js
server.js
Try it out!
server.js
package.json
Module Learnings
• Write some code (.js file)
• Export: module.exports = { say: say }
• Import: var doge = require(‘./doge’)
• Write some tests
• Compose modules into apps
• The outside world: package.json
#twg@twg
NODE.JS API
QUALITY: • Very well documented • Almost completely stable • Moving towards 1.0
!QUANTITY:
• As small as possible • You can learn it in a day or two
Core API
#twg@twg
NODE PACKAGE MANAGER
65,000 packages
But which packages are good?
• Learn to sniff out the quality
• Read npm’s Most Starred, Most Required
• Build your own bag of tricks
#twg@twg
express, restify jade, stylus
mongoose, sequelize async, q
ws, primus mocha, chai
yargs bunyan forever
“It’s not what you know, it’s who you know”
- Abraham Lincoln
substack
caolanbriancv1feross
tjholowaychuk isaacs henrikjoreteg
Node.js is General-Purpose
• Conventional web apps
#twg@twg
Node.js is General-Purpose
• Conventional web apps
• Realtime web apps
#twg@twg
Node.js is General-Purpose
• Conventional web apps
• Realtime web apps
• Cross-platform desktop apps
#twg@twg
Node.js is General-Purpose
• Conventional web apps
• Realtime web apps
• Cross-platform desktop apps
• Network servers
#twg@twg
CONTROL ROBOTS
#twg@twg
Inclusive, friendly people who are open to learning and teaching
!Toronto Node.JS Meetup
Currently hosted at the TWG studio !
Amazing conferences Such as this one! And many others
Vibrant Community
#twg@twg
#twg@twg
NodeUp Podcast - Team Episodes
#twg@twg
Node.js Low barrier to entry
Simple
Powerful
BE EXCITEDbe, be excited
Thank You.