Introduction to NodeJS

639 views

Published on

Published in: Software, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
639
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to NodeJS

  1. 1. Introduction to NodeJS Zahid Mahir
  2. 2. What is NodeJS? • Event Driven platform for JavaScript • First released in 2009 • Good for real-time interaction with a website – Chat applications – Location tracking • Bad for CPU intensive tasks – Predicting the weather
  3. 3. Callbacks
  4. 4. Events
  5. 5. Threads and Scheduling • Smallest sequence of executable code • Run multiple threads together via multithreading • Threads block • Threads are managed by a Scheduler
  6. 6. Tradition Webserver Example • Request blog post • Call to database for post • Build HTML • Send response
  7. 7. Event Loop Taken from: http://misclassblog.com/
  8. 8. How to Code • Change to only asynchronous programming Taken from: Matt Perpick, “Writing Asynchronous JavaScript 101”
  9. 9. When to Node • IO heavy applications • NOT CPU heavy applications
  10. 10. NPM • Node Package Manager • Actually stands for “npm is not an acronym” • Install dependencies • Install NodeJS applications • Package and distribute your code
  11. 11. Find Me zahid@zmhr.me zmhr.me @zahidmahir github.com/zahidmahir
  12. 12. Thank You

×