Getting Started with Node.JS with Derek Watson

1,464 views

Published on

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.

Published in: Technology

Getting Started with Node.JS with Derek Watson

  1. 1. Intro to Node.js Derek Watson Mar 29, 2014
  2. 2. Story time! JavaScript Pretty cool language #javascript The Working Group Software shop @twg Derek Watson Developer guy @dcwca and me
  3. 3. what is it good for?
  4. 4. What is node good for? •JSON APIs #twg@twg
  5. 5. What is node good for? •JSON APIs •Network servers #twg@twg
  6. 6. What is node good for? •JSON APIs •Network servers •Realtime web applications #twg@twg
  7. 7. ! MODULES
  8. 8. everything is a module
  9. 9. Modules everywhere •Your .js files are modules •Libraries you use are modules •Your whole app is one big module #twg@twg
  10. 10. doge.js: An example module #twg@twg
  11. 11. doge.js
  12. 12. program.js
  13. 13. Try it out!
  14. 14. “The main thing that distinguishes legacy code is a lack of tests.” - Michael Feathers
  15. 15. test/doge.js
  16. 16. test/doge.js
  17. 17. test/doge.js
  18. 18. server.js
  19. 19. server.js
  20. 20. Try it out!
  21. 21. server.js
  22. 22. package.json
  23. 23. 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
  24. 24. NODE.JS API
  25. 25. 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
  26. 26. NODE PACKAGE MANAGER
  27. 27. 65,000 packages
  28. 28. 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
  29. 29. express, restify jade, stylus mongoose, sequelize async, q ws, primus mocha, chai yargs bunyan forever
  30. 30. “It’s not what you know, it’s who you know” - Abraham Lincoln
  31. 31. substack caolanbriancv1feross tjholowaychuk isaacs henrikjoreteg
  32. 32. Node.js is General-Purpose •Conventional web apps #twg@twg
  33. 33. Node.js is General-Purpose •Conventional web apps •Realtime web apps #twg@twg
  34. 34. Node.js is General-Purpose •Conventional web apps •Realtime web apps •Cross-platform desktop apps #twg@twg
  35. 35. Node.js is General-Purpose •Conventional web apps •Realtime web apps •Cross-platform desktop apps •Network servers #twg@twg
  36. 36. CONTROL ROBOTS #twg@twg
  37. 37. 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
  38. 38. #twg@twg NodeUp Podcast - Team Episodes
  39. 39. #twg@twg Node.js Low barrier to entry Simple Powerful BE EXCITED be, be excited
  40. 40. QUESTIONS? Email: derek@twg.ca Twitter: @dcwca
  41. 41. Thank You.

×