Node.js

HP.com Brown Bag Session
      15 Feb 2012
          Alif
What?!

    Server-side javascript

 Built on top of Chrome V8 –
   insanely fast, and getting better every day


http://code.google.com/p/v8/

       C: node server.js
Some facts..

       Not a web framework..
    Non blocking I/O – event loop
Not written in javascript itself. It’s in C.

              Javascript is only,
                       Function
                        Object
                       Number
                        String
                        Array

   Wasn’t designed for TCP / network stuff by nature
Why

Node's goal is to provide an easy
 way to build scalable network
          programs.
How

Keep slow operations from
blocking other operations.
Traditional I/O

var data = file.read('file.txt');
  doSomethingWith(data);



Something is not right here
FAIL !

var data = file.read('file.txt');
    // zzzZZzzz … …. … . . .
  doSomethingWith(data);



 Don’t waste those cycles!
Async I/O
file.read('file.txt', function(data) {
      doSomethingWith(data);
                   });
        doSomethingElse();

            WIN !
  No need to wait for the disk,
 do something else meanwhile!
Seriously, why javascript though :/


    De facto standard language for web
                programming

     do not underestimate javascript,
      https://github.com/languages
Nodejs is…
                - Immature
  - Not yet proven at large scale code size

                         Interesting reading:
        http://teddziuba.com/2011/10/node-js-is-cancer.html




it's opaque and weird to most but completely
            usable for a small group
Best use for..

           JSON APIs –
       heavy ajax call consumption


       Streaming data –
     parsing file uploads in real time


Soft Realtime Applications –
  chat/IM, twitter, realtime scoreboards
Who use it

                Real world app,
https://github.com/joyent/node/wiki/Projects,-
    Applications,-and-Companies-Using-Node

         .. growing rapidly each days
The beauty of Node is that you can write
entirely simple and mundane JavaScript to get
                 these results.
Node Modules
  NPM – Node package manager
    http://search.npmjs.org/

 C: npm install express jade stylus

Or, define it in package.json format,




     Then just hit npm install
{ live demo session }

Stalk here for more gossips:
      http://nodejs.org
   http://howtonode.org

More Related Content

ODP
Riereta Node.js session 3 (with notes)
PDF
Web technologies for desktop development
PPTX
PHP and node.js Together
PDF
Building a REST API with Node.js and MongoDB
PDF
息子たちがローマ字勉強するための <s>HTML5</s> Web標準 アプリ作ってみた
KEY
Getting Started with MongoDB and Node.js
PDF
Salt and pepper — native code in the browser Browser using Google native Client
PDF
Everyday React Native
Riereta Node.js session 3 (with notes)
Web technologies for desktop development
PHP and node.js Together
Building a REST API with Node.js and MongoDB
息子たちがローマ字勉強するための <s>HTML5</s> Web標準 アプリ作ってみた
Getting Started with MongoDB and Node.js
Salt and pepper — native code in the browser Browser using Google native Client
Everyday React Native

What's hot (20)

PDF
Integrating Node.js with PHP
PPTX
Future of NodeJS
PDF
Horizontally Scaling Node.js and WebSockets
PDF
Webconf nodejs-production-architecture
PDF
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
PPTX
Node js introduction
PDF
SFScon 2020 - Riccardo Magliocchetti - Avoiding spelling mistakes a WebAssemb...
PDF
Web pack and friends
PDF
NodeJs Intro - JavaScript Zagreb Meetup #1
PDF
(C)NodeJS
PPTX
Introduction to Node.js
PDF
Let s Enjoy Node.js
PDF
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
PPT
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
PPTX
Вредные советы .NET разработчикам, Сергей Калинец
PDF
Daniel Steigerwald - Este.js - konec velkého Schizma
PDF
Full stack java script development
PDF
S&T What I know about Node 110817
PPTX
WebUSB
PDF
Best node js course
Integrating Node.js with PHP
Future of NodeJS
Horizontally Scaling Node.js and WebSockets
Webconf nodejs-production-architecture
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
Node js introduction
SFScon 2020 - Riccardo Magliocchetti - Avoiding spelling mistakes a WebAssemb...
Web pack and friends
NodeJs Intro - JavaScript Zagreb Meetup #1
(C)NodeJS
Introduction to Node.js
Let s Enjoy Node.js
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
Вредные советы .NET разработчикам, Сергей Калинец
Daniel Steigerwald - Este.js - konec velkého Schizma
Full stack java script development
S&T What I know about Node 110817
WebUSB
Best node js course
Ad

Similar to Node.js (20)

PPTX
02 Node introduction
PPTX
Nodejs
PPTX
PPT
Node js
PPTX
Basic Concept of Node.js & NPM
PPT
Node.js
PPTX
Node.js: A Guided Tour
PDF
Nodejs presentation
PDF
Developing realtime apps with Drupal and NodeJS
PDF
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
PPTX
An overview of node.js
PPTX
Introduction to node.js By Ahmed Assaf
PPTX
Node js for beginners
PPTX
Introduction to Node.js
PPT
node.js
PDF
Introduction to Node.js
PPTX
Introduction to Node.js
PPTX
PDF
ODP
Node js presentation
02 Node introduction
Nodejs
Node js
Basic Concept of Node.js & NPM
Node.js
Node.js: A Guided Tour
Nodejs presentation
Developing realtime apps with Drupal and NodeJS
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
An overview of node.js
Introduction to node.js By Ahmed Assaf
Node js for beginners
Introduction to Node.js
node.js
Introduction to Node.js
Introduction to Node.js
Node js presentation
Ad

Recently uploaded (20)

PDF
Getting Started with Data Integration: FME Form 101
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Five Habits of High-Impact Board Members
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PPT
Geologic Time for studying geology for geologist
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Unlock new opportunities with location data.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Enhancing emotion recognition model for a student engagement use case through...
Getting Started with Data Integration: FME Form 101
Tartificialntelligence_presentation.pptx
Chapter 5: Probability Theory and Statistics
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Five Habits of High-Impact Board Members
Web Crawler for Trend Tracking Gen Z Insights.pptx
Geologic Time for studying geology for geologist
Taming the Chaos: How to Turn Unstructured Data into Decisions
observCloud-Native Containerability and monitoring.pptx
Getting started with AI Agents and Multi-Agent Systems
Final SEM Unit 1 for mit wpu at pune .pptx
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
O2C Customer Invoices to Receipt V15A.pptx
WOOl fibre morphology and structure.pdf for textiles
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
1 - Historical Antecedents, Social Consideration.pdf
Unlock new opportunities with location data.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Enhancing emotion recognition model for a student engagement use case through...

Node.js

  • 1. Node.js HP.com Brown Bag Session 15 Feb 2012 Alif
  • 2. What?! Server-side javascript Built on top of Chrome V8 – insanely fast, and getting better every day http://code.google.com/p/v8/ C: node server.js
  • 3. Some facts.. Not a web framework.. Non blocking I/O – event loop Not written in javascript itself. It’s in C. Javascript is only, Function Object Number String Array Wasn’t designed for TCP / network stuff by nature
  • 4. Why Node's goal is to provide an easy way to build scalable network programs.
  • 5. How Keep slow operations from blocking other operations.
  • 6. Traditional I/O var data = file.read('file.txt'); doSomethingWith(data); Something is not right here
  • 7. FAIL ! var data = file.read('file.txt'); // zzzZZzzz … …. … . . . doSomethingWith(data); Don’t waste those cycles!
  • 8. Async I/O file.read('file.txt', function(data) { doSomethingWith(data); }); doSomethingElse(); WIN ! No need to wait for the disk, do something else meanwhile!
  • 9. Seriously, why javascript though :/ De facto standard language for web programming do not underestimate javascript, https://github.com/languages
  • 10. Nodejs is… - Immature - Not yet proven at large scale code size Interesting reading: http://teddziuba.com/2011/10/node-js-is-cancer.html it's opaque and weird to most but completely usable for a small group
  • 11. Best use for.. JSON APIs – heavy ajax call consumption Streaming data – parsing file uploads in real time Soft Realtime Applications – chat/IM, twitter, realtime scoreboards
  • 12. Who use it Real world app, https://github.com/joyent/node/wiki/Projects,- Applications,-and-Companies-Using-Node .. growing rapidly each days
  • 13. The beauty of Node is that you can write entirely simple and mundane JavaScript to get these results.
  • 14. Node Modules NPM – Node package manager http://search.npmjs.org/ C: npm install express jade stylus Or, define it in package.json format, Then just hit npm install
  • 15. { live demo session } Stalk here for more gossips: http://nodejs.org http://howtonode.org