Introduction to NodeJS

  • 280 views
Uploaded on

 

More in: Software , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
280
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
5
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Introduction to NodeJS Zahid Mahir
  • 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. Callbacks
  • 4. Events
  • 5. Threads and Scheduling • Smallest sequence of executable code • Run multiple threads together via multithreading • Threads block • Threads are managed by a Scheduler
  • 6. Tradition Webserver Example • Request blog post • Call to database for post • Build HTML • Send response
  • 7. Event Loop Taken from: http://misclassblog.com/
  • 8. How to Code • Change to only asynchronous programming Taken from: Matt Perpick, “Writing Asynchronous JavaScript 101”
  • 9. When to Node • IO heavy applications • NOT CPU heavy applications
  • 10. NPM • Node Package Manager • Actually stands for “npm is not an acronym” • Install dependencies • Install NodeJS applications • Package and distribute your code
  • 11. Find Me zahid@zmhr.me zmhr.me @zahidmahir github.com/zahidmahir
  • 12. Thank You