SlideShare a Scribd company logo
Node.JS 
Javascript no lado do Servidor

         Mauricio Vieira

                           Salvador, 28 de abril de 2012
Sobre mim
   /mauriciovieira
   @mauriciovieira
   /mbcvieira
http://mauriciovieira.net


      Omni ignotum pro magnifico
http://linguagil.com.br
      Agosto/2012
http://nodejs.org
JavaScript → código nativo
Objetos em cache
Coletor de lixo stop-the-world


  http://code.google.com/p/v8
Reactor Pattern
Perl AnyEvent
Python Twisted
Ruby EventMachine
Erlang


       Javascript
setTimeout(function() {
  console.log('World!');
}, 2000);
console.log('Hello');
    var fs = require('fs');

     fs.stat('/etc/passwd', function(err, stats) {
       if (err) {console.log(err.message); return; }
       console.log(stats);
       //console.log('this file is ' + stats.size + ' bytes
       long.');
     });
The Way of Node



  http://bit.ly/A3bObP
The Way of Node

  1. Node is a platform
timers, process, util, events, Buffer,
Stream, Crypto, TLS/SSL, fs, path,
Net, UDP, dns, HTTP(S), tty, zlib, os.
http://commonjs.org
92672795




http://npmjs.org
The Way of Node

2. Node is JavaScript

 (but JavaScript is not Node)
The Way of Node

 3. Node is callbacks
 & Streams
(standard callback API and Streams)
http://socket.io
http://faye.jcoglan.com/
http://pubsub.io/
The Way of Node
4. Node is not pretending
to be blocking when it
is not.
The Way of Node
5. Node is not going to
include that module.
The Way of Node
6. Node is for building.

   (not a science experiment
   or academic research)
http://expressjs.com/
http://geddyjs.org/
http://railwayjs.com/
http://flatironjs.org/
The Way of Node
7. Node is a community.
http://mashable.com/2011/03/10/node-js/
The Way of Node
8. Node is faster.

   (Node is never fast enough)
The Way of Node
9. Node is fun.

        Obviously!
http://nodeknockout.com/
Observer         Permite
                 observar o
                 que os
                 usuários
                 fazem em
                 tempo real !



   http://observer.no.de/
Eight Bit Beats

Collaborative,
social beat
and melody
sequencer.



 http://youtu.be/QmtB9o4HBQU
Driv.in               Time
                      brasileiro!

                      Drive in
                      virtual :-)




          http://driv.in/
Doodle or die
Players
create chains
of alternating
drawings and
captions with
hilarious
results.

     http://doodleordie.com/
ACROnode.com
                 Criação de
                 backronimos.




     http://driv.in/
GPU lava

Usa a
biblioteca
node-webgl
feita durante
as 48 horas
de concurso.

    http://minimason.no.de/
Chess@HomeProjeto a la
                      SETI@home
                      para
                      destronar o
                      maior
                      computador
                      de Xadrez


http://joshfire.nko2.nodeknockout.com/
Mais exemplos
https://gomockingbird.com/
http://codestre.am
Obrigado!
   /mauriciovieira
   @mauriciovieira
   /mbcvieira
http://mauriciovieira.net


      Omni ignotum pro magnifico

More Related Content

What's hot (15)

TXT
Ssh2 install
GGclub
 
PDF
Compojure
Christophe Marchal
 
PDF
Real programmers use programming languages (Not shell scripts)
thedandan
 
PDF
Vim FTW!
Jano González
 
PPTX
Js everywhere (Georgy Bunin)
Georgy Bunin
 
PDF
MongoDB shell games: Here be dragons .. and JavaScript!
Stennie Steneker
 
PDF
3D Voxel Worlds with voxel.js
Vlad Filippov
 
PDF
Why use JavaScript in Hardware? GoTo Conf - Berlin
TechnicalMachine
 
PDF
rush, the Ruby shell and Unix integration library
Adam Wiggins
 
PDF
Integração contínua com Hudson CI
Almir Mendes
 
PPTX
Build 2017 - P4103 - What's new in ChakraCore
Windows Developer
 
PDF
Why zsh is Cooler than Your Shell
brendon_jag
 
PDF
Bitbucket as a Platform - Atlassian Summit 2012
Atlassian
 
PDF
A toolbelt of seasoned bug hunter - Damir Zekic
Ruby Meditation
 
PDF
Why Zsh is Cooler than Your Shell
jaguardesignstudio
 
Ssh2 install
GGclub
 
Real programmers use programming languages (Not shell scripts)
thedandan
 
Vim FTW!
Jano González
 
Js everywhere (Georgy Bunin)
Georgy Bunin
 
MongoDB shell games: Here be dragons .. and JavaScript!
Stennie Steneker
 
3D Voxel Worlds with voxel.js
Vlad Filippov
 
Why use JavaScript in Hardware? GoTo Conf - Berlin
TechnicalMachine
 
rush, the Ruby shell and Unix integration library
Adam Wiggins
 
Integração contínua com Hudson CI
Almir Mendes
 
Build 2017 - P4103 - What's new in ChakraCore
Windows Developer
 
Why zsh is Cooler than Your Shell
brendon_jag
 
Bitbucket as a Platform - Atlassian Summit 2012
Atlassian
 
A toolbelt of seasoned bug hunter - Damir Zekic
Ruby Meditation
 
Why Zsh is Cooler than Your Shell
jaguardesignstudio
 

Similar to Node js javascript no lado do servidor (20)

KEY
Dcjq node.js presentation
async_io
 
PDF
Nodejs a-practical-introduction-oredev
Felix Geisendörfer
 
PDF
Introduction to Node.js
Jack Franklin
 
PPTX
Introduction to Node.js
Vikash Singh
 
PDF
A295 nodejs-knowledge-accelerator
Michael Dawson
 
PPTX
Nodejs
Vinod Kumar Marupu
 
PDF
Introduction to Node.js
Aaron Rosenberg
 
PDF
Introduction to Node.js
Rob O'Doherty
 
PDF
Ask us anything v9
Michael Dawson
 
PDF
Node.js – ask us anything!
Dev_Events
 
PPTX
Introduction to node.js GDD
Sudar Muthu
 
ODP
Riereta Node.js session 3 (with notes)
Tekno Paul
 
PDF
soft-shake.ch - Hands on Node.js
soft-shake.ch
 
PPTX
Node.JS| Coffeescript Presentation
Sam Frons
 
KEY
Node.js - A practical introduction (v2)
Felix Geisendörfer
 
PDF
Why Node.js
guileen
 
PDF
Why Nodejs Guilin Shanghai
Jackson Tian
 
PDF
Essential Node.js for Web Developers from Developer Week 2013
CA API Management
 
PPTX
The Future of Node - @rvagg - NodeConf Christchurch 2015
rvagg
 
Dcjq node.js presentation
async_io
 
Nodejs a-practical-introduction-oredev
Felix Geisendörfer
 
Introduction to Node.js
Jack Franklin
 
Introduction to Node.js
Vikash Singh
 
A295 nodejs-knowledge-accelerator
Michael Dawson
 
Introduction to Node.js
Aaron Rosenberg
 
Introduction to Node.js
Rob O'Doherty
 
Ask us anything v9
Michael Dawson
 
Node.js – ask us anything!
Dev_Events
 
Introduction to node.js GDD
Sudar Muthu
 
Riereta Node.js session 3 (with notes)
Tekno Paul
 
soft-shake.ch - Hands on Node.js
soft-shake.ch
 
Node.JS| Coffeescript Presentation
Sam Frons
 
Node.js - A practical introduction (v2)
Felix Geisendörfer
 
Why Node.js
guileen
 
Why Nodejs Guilin Shanghai
Jackson Tian
 
Essential Node.js for Web Developers from Developer Week 2013
CA API Management
 
The Future of Node - @rvagg - NodeConf Christchurch 2015
rvagg
 
Ad

Recently uploaded (20)

PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Ad

Node js javascript no lado do servidor