SlideShare ist ein Scribd-Unternehmen logo
1 von 78
Downloaden Sie, um offline zu lesen
this presentation code is on
https://github.com/gabrielelana/node-examples
gabriele lana
  gabriele.lana@cleancode.it
    twitter: @gabrielelana
         this presentation code is on
https://github.com/gabrielelana/node-examples
why
         node.js?

“Node's goal is to
  provide an easy
   way to build
scalable network
    programs”

           http://nodejs.org/#about
what is
                  node.js?
•   asynchronous i/o framework
•   core in c++ on top of v8
•   rest of it in javascript
•   swiss army knife for network
    related stuffs
•   can handle thousands of
    concurrent connections with
    minimal overhead (cpu/memory)
    on a single process
Single thread
synchronous I/0
Single thread
synchronous I/0
multiple thread
synchronous I/0
multiple thread
synchronous I/0
you can
  “always”
 scale with
  multiple
machines but
  it costs
  you $$$
but...
what is HE
 doing?
CPU BOUND
          TASKS?


  but...
what is HE
 doing?
CPU BOUND
          TASKS?

             ...OR I/o
  but...       BOUND
what is HE    TASKS?
 doing?
synchronous I/0

function
productsInCart(request,
response)
{




var
db
=
new
Db()




var
user
=
new
User(request)




if
(user.isAuthorized("cart/products"))
{








response.write(












JSON.stringify(
















db.productsInCart(user.cartId())












)








)




}
else
{








response.unauthorized()




}
}
synchronous I/0

function
productsInCart(request,
response)
{




var
db
=
new
Db()




var
user
=
new
User(request)




if
(user.isAuthorized("cart/products"))
{








response.write(












JSON.stringify(
















db.productsInCart(user.cartId())












)








)




}
else
{








response.unauthorized()




}
}
synchronous I/0

function
productsInCart(request,
response)
{




var
db
=
new
Db()




var
user
=
new
User(request)




if
(user.isAuthorized("cart/products"))
{








response.write(












JSON.stringify(
















db.productsInCart(user.cartId())












)








)




}
else
{








response.unauthorized()




}
}
synchronous I/0

function
productsInCart(request,
response)
{




var
db
=
new
Db()




var
user
=
new
User(request)




if
(user.isAuthorized("cart/products"))
{








response.write(












JSON.stringify(
















db.productsInCart(user.cartId())












)








)




}
else
{








response.unauthorized()




}
}
single thread
asynchronous I/0
single source events
  STATES




                      EVENTS
http://www.infoq.com/presentations/Death-by-Accidental-Complexity
single source events
 function
productsInCart(request,
response)
{
 



var
db
=
null,
user
=
null,
...
 



createDb()
 



handle(function(source,
event)
{
 







if
(event["name"]
===
"createDb")
{
 











if
(db
===
null)
{
 















db
=
event.data
 















createUser(request)
 











}
else
{
 















????
 











}
 







}
else
if
(event["name"]
===
"createUser")
{
 











if
(user
===
null)
{
 















user
=
event.data
 















...
 











}
else
{
 















???
 











}
 







...

 







}
else
{
 











source.push(event,
state)
 







}
 



},
"_initial")
 }
asynchronous I/0
  single thread
asynchronous I/0


           I am
       “callback”
         call me
         if you
        need me...
asynchronous I/0
  single thread
asynchronous I/0
multiple source events
     (local state)
STATES




         EVENTS
multiple source events
     (local state)
  function
productsInCart(request,
response)
{
  



createDb(function(db)
{
  







createUser(function(user)
{
  











if
(user.isAuthorized("cart/products")
{
  















response.write(
  



















JSON.stringify(
  























db.productsInCart(user.cartId())
  



















)
  















)
  















response.end()
  











})
else
{
  















response.unauthorized()
  











}
  







})
  



})
  }
multiple source events
     (local state)
  function
productsInCart(request,
response)
{
  



createDb(function(db)
{
  







createUser(function(user)
{
  











if
(user.isAuthorized("cart/products")
{
  















response.write(
  



















JSON.stringify(
  























db.productsInCart(user.cartId())
  



















)
  















)
  















response.end()
  











})
else
{
  















response.unauthorized()
  











}
  







})
  



})
  }
Event Emitter
                         (local state)
var
http
=
require("http")

var
server
=
http.createServer(function(request,
response)
{


response.writeHead(200,
{




"Content-Type":
"plain/text"


})


response.write("Hello
Worldn")


response.end()
})

server.listen(8080)

console.log(">
SERVER
STARTED")



                      01#hello_world/hello_world_server.js
Event Emitter
                         (local state)
var
http
=
require("http")

var
server
=
http.createServer(function(request,
response)
{


response.writeHead(200,
{




"Content-Type":
"plain/text"


})


response.write("Hello
Worldn")


response.end()
})

server.listen(8080)

console.log(">
SERVER
STARTED")



                      01#hello_world/hello_world_server.js
Event Emitter
                         (local state)
var
http
=
require("http")

var
server
=
http.createServer(function(request,
response)
{


response.writeHead(200,
{




"Content-Type":
"plain/text"


})


response.write("Hello
Worldn")


response.end()
})

server.listen(8080)

console.log(">
SERVER
STARTED")



                      01#hello_world/hello_world_server.js
Event Emitter
                         (local state)
var
http
=
require("http")

var
server
=
http.createServer(function(request,
response)
{


response.writeHead(200,
{




"Content-Type":
"plain/text"


})


response.write("Hello
Worldn")


response.end()
})

server.listen(8080)

console.log(">
SERVER
STARTED")



                      01#hello_world/hello_world_server.js
Event Emitter
                                (local state)
coder@apollo:~/Work/src/node/examples$ node hello_world_server.js
> SERVER STARTED
                                                                    #1
coder@apollo:~$ curl "http://localhost:8080/"
Hello World
                                                                    #2
Event Emitter
                         (local state)
var
server
=
require("http").createServer()

server.on("request",
function(request,
response)
{


console.log(">
REQUEST
STARTED")


request.on("end",
function()
{




console.log(">
REQUEST
CLOSED")




response.writeHead(200,
{






"Content-Type":
"plain/text"




})




response.end("Hello
Worldn")




server.close()


})


response.on("close",
function()
{




console.log(">
RESPONSE
CLOSED")


})
})

              01#hello_world/hello_world_server_emitter.js
Event Emitter
                         (local state)

...

server.on("close",
function()
{


console.log(">
SERVER
CLOSED")
})

server.on("listening",
function()
{


console.log(">
SERVER
STARTED")
})

server.listen(8080)




              01#hello_world/hello_world_server_emitter.js
Event Emitter
                                (local state)
coder@apollo:~/Work/src/node/examples$ node hello_world_server.js
> SERVER STARTED                                                    #1
coder@apollo:~$ curl "http://localhost:8080/"
Hello World                                                         #2
                                                                    #1
> REQUEST STARTED
> REQUEST CLOSED
> SERVER CLOSED
why so
complicated?
data streams
server.on("request",
function(request,
response)
{


var
chunks
=
[],






output
=
fs.createWriteStream("./output")



request.on("data",
function(chunk)
{




chunks
=
forEachLine(chunks.concat(chunk),
function(line)
{






output.write(parseInt(line,
10)
*
2)






output.write("n")




})


})



request.on("end",
function()
{




response.writeHead(200,
{
"Content-Type":
"plain/text"
})




response.end("OKn")




output.end()




server.close()


})
})
                               02#proxy_stream/proxy_stream.js
Event Emitter
                                (local state)
coder@apollo:~/Work/src/node/examples$ node stream_doubler.js
                                                                    #1
coder@apollo:~$ curl "http://localhost:8080/" --data $'1n2n3n'
OK                                                                  #2
coder@apollo:~/Work/src/node/examples$ cat output
2
4
6                                                                   #1
why
                 javascript?


•   Friendly callbacks
•   ubiquitous (well known)
•   no I/o primitives
•   one language to rule them all
web applications
                             before: a web
mind shift #1               server with some
                            application logic


                        application
           Web server
                        application


                        application


                        application
web applications
                        after: an application
mind shift #1             accessible over
                                http

        web server




                     application
web applications
                        after: an application
mind shift #1                 that can
                          communicate and
                         collaborate with
        web server
                             the world




                     application
web applications
                    before: stateful
mind shift #2   • no easy to scale
                • no easy to reuse

                v
                     M
                c
web applications
                    before: stateful
mind shift #2   • no easy to scale
                • no easy to reuse

                v
                     M
                c


  conversation       application
     state             state
web applications
                    before: stateful
mind shift #2   • no easy to scale
                • no easy to reuse

                v
                     M
                c



   tightly coupled
web applications
                    after: stateless
mind shift #2      • easy to scale
                   • easy to reuse


       v
            http
                       M
       c
web applications
                    after: stateless
mind shift #2      • easy to scale
                   • easy to reuse


       v
            http
                       M
       c


conversation       application
   state             state
web applications
                       after: stateless
mind shift #2
                http




                       web server
                                        M
                http

                                     statefull
                                    connection



• easy to scale                                  M
• easy to reuse
no fluff
just stuff
tic - tac - toe
tic - tac - toe



demo
INSTALL NPM
                                   (node packet manager)

coder@apollo:~/Work/src/node/examples$ curl http://npmjs.org/install.sh | sh
...
npm ok
It worked

coder@apollo:~/Work/src/node/examples$ npm list | wc -l
1776

coder@apollo:~/Work/src/node/examples$   npm   install   connect@0.2.5
coder@apollo:~/Work/src/node/examples$   npm   install   faye@0.5.3
coder@apollo:~/Work/src/node/examples$   npm   install   backbone@0.3.0
coder@apollo:~/Work/src/node/examples$   npm   install   underscore@1.1.2
static handler

var
server
=
connect.createServer(connect.logger({
"buffer":
true
}))


.use("/",
connect.router(function(resource)
{




resource.get("/board",
function(request,
response,
next)
{






request.url
=
"/board.html"






next()




})




...


}),
connect.staticProvider({





"root":
path.join(__dirname,
"static"),





"cache":
true



}))

server.listen(port)



                                             05#tictactoe/server.js
game handler
                           (generate board-id)






resource.post("/board",
function(request,
response)
{






response.writeHead(200,
{
"Content-Type":
"application/json"
})






uuid(function(boardId)
{








response.end(










JSON.stringify({












"board":
{
"id":
boardId
}










})








)






})




})




                                             05#tictactoe/server.js
game handler
                              (initial board/user)




resource.get("/board/:id",
function(request,
response)
{






var
board
=
boards.get(request.params["id"])






if
(board
===
undefined)
{








board
=
new
Board({
"id":
request.params["id"]
})








boards.add(board)






}






uuid(function(userId)
{








var
user
=
board.user(userId)








response.writeHead(200,
{
"Content-Type":
"application/json"
})








response.end(










JSON.stringify({












"board":
board,












"user":
user










})








)






})




})
                                                05#tictactoe/server.js
game handler
                                 (make your move)







resource.post("/board/:id",
function(request,
response)
{






waitForBody(request,
function(body)
{








boards.get(request.params["id"]).move(JSON.parse(body))








response.writeHead(204,
{
"Content-Type":
"application/json"
})








response.end(JSON.stringify({
"response":
"ok"
}))






})




})




                                                05#tictactoe/server.js
comet handler

var
comet
=
new
Faye.NodeAdapter({
"mount":
"/comet",
"timeout":
50
})

var
server
=
connect.createServer(connect.logger({
"buffer":
true
}))


.use("/comet",
function(request,
response,
next)
{




comet.handle(request,
response)


})


...
})

comet.attach(server)




                                              05#tictactoe/server.js
comet EVENTS
                       on backbone events



var
client
=
comet.getClient()
var
boards
=
new
Backbone.Collection

boards.bind("change",
function(board)
{


client.publish("/board-"
+
board.get("id"),
board)
})




                                         05#tictactoe/server.js
in browser
                                     routing

$(function()
{



$.sammy(function()
{









this.get("",
function(context)
{






$.post("/board",
function(response)
{








context.redirect("#/board/"
+
response["board"]["id"])






})




})





...


}).run()
})



                                  05#tictactoe/static/board.html
in browser
                                 routing/start game





var
comet
=
new
Faye.Client("/comet")




var
game
=
new
Game()





this.get("#/board/:id",
function(context)
{






game.start()






$.get("/board/"
+
context.params["id"],
function(response)
{








game.set({
"me":
new
User(response.user)
})








game.set({
"board":
new
Board(response.board)
})








comet.connect()








comet.subscribe("/board-"
+
context.params["id"],
function(board)
{










game.get("board").set(board)








})






})




})

                                            05#tictactoe/static/board.html
in browser
                             game logic example




window.Game
=
Backbone.Model.extend({




"initialize":
function()
{






...






game.get("board").bind("change",
function()
{








if
(this.isMyTurn())
{










return
game.trigger("make-your-move")








}








return
game.trigger("wait-for-move")






})




}


})




                               05#tictactoe/static/js/application.js
in browser
                              game logic example




game.bind("play-with-board",
function(cells)
{






buildBoard(['_'].concat(cells))




})





game.bind("play-with-mark",
function(mark)
{






showPlayerMarker(cellMarksUrl[myMark
=
mark])




})




game.bind("make-your-move",
function()
{






$("#board").undelegate()






$("#board").delegate("*[id^=cell]",
"mouseover",
function()
{








$(this).data("cell").select()






})






$("#board").delegate("*[id^=cell]",
"mouseout",
function()
{








$(this).data("cell").unselect()






})






...

                                05#tictactoe/static/js/application.js
What about
cpu bound
  tasks?
the fork
                               be with you


#!/bin/bash

for
count
in
`seq
1
100`;
do




echo
$count




sleep
0.1
done




                03#long_running_jobs/long_running_job.sh
the fork
                                be with you
var
spawn
=
require("child_process").spawn,




server
=
require("http").createServer()

server.on("request",
function(request,
response)
{


var
job
=
spawn("./long_running_job.sh")



job.stdout.on("data",
function(tick)
{




response.write(tick)




})



job.on("exit",
function()
{




response.end()


})
})


              03#long_running_jobs/long_running_server.js
the fork
                                     be with you
coder@apollo:~$ ab -c 1 -n 1 "http://localhost:8080/"
...
Concurrency Level:      1
Time taken for tests:   10.531 seconds
...


coder@apollo:~$ ab -c 1 -n 2 "http://localhost:8080/"
...
Concurrency Level:      1
Time taken for tests:   20.108 seconds
...
the fork
                                     be with you
coder@apollo:~$ ab -c 2 -n 1 "http://localhost:8080/"
...
Concurrency Level:      2
Time taken for tests:   10.634 seconds
...

coder@apollo:~$ ab -c 100 -n 100 "http://localhost:8080/"
...
Concurrency Level:      100
Time taken for tests:   11.198 seconds
...

coder@apollo:~$ ab -c 500 -n 500 "http://localhost:8080/"
...
Concurrency Level:      500
Time taken for tests:   31.082 seconds
...
enter comet


w
 at
 at ch
watch
    ch
                M                spawn
w




                watch
            w




                        w
         t a




                        at
           ch




                            ch
enter comet



demo
static handler

var
port
=
8080

var
server
=
connect.createServer(connect.logger())


.use("/comet",
function(request,
response)
{
...
})


.use("/spawn",
function(request,
response)
{
...
})


.use("/",
connect.staticProvider({





"root":
path.join(__dirname,
"static"),





"cache":
true



}))

comet.attach(server)

server.listen(port)



                            04#progress/progress_server.js
comet handler


var
comet
=
new
Faye.NodeAdapter({


"mount":
"/comet",
"timeout":
50

})

var
server
=
connect.createServer(connect.logger())


.use("/comet",
function(request,
response,
next)
{




comet.handle(request,
response)


})


...




                            04#progress/progress_server.js
spawn handler
var
client
=
comet.getClient(),
jobCounter
=
0

var
server
=
connect.createServer(connect.logger())


.use("/comet",
function(request,
response)
{
...
})


.use("/spawn",
function(request,
response,
next)
{




var
worker
=
spawn("./long_running_process.sh"),








jobId
=
jobsCounter++













response.writeHead(200,
{
"Content-Type":
"plain/text"
})




response.end("OKn")





worker.stdout.on("data",
function(progress)
{






client.publish("/job-progress",
{









"id":
jobId,









"progress":
parseInt(progress.toString(),
10)






})




})


})
                             04#progress/progress_server.js
in browser

<script>


$(function()
{




var
comet
=
new
Faye.Client("/comet")





comet.connect()




comet.subscribe("/job-progress",
function(job)
{






$("#template").progressBar(job.id,
job.progress)




})


})
</script>




                                 04#progress/static/index.html
node.js is
 awesome
 but when
 should i
  use it?
when to use it?

•   chat/messaging
•   real-time applications
•   intelligent proxies
•   high concurrency applications
•   communication hubs
•   coordinators
please tell
me something
 bad about
  node.js
some warnings

•   release stable 0.2.4 (young)
•   lots of stuffs to look at
•   lots of half backed stuffs
•   retro compatibility???
•   bad at handling static contents
•   hard to find organized and
    authoritative informations
Questions?
gabriele lana
  gabriele.lana@cleancode.it
    twitter: @gabrielelana
         this presentation code is on
https://github.com/gabrielelana/node-examples

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBhargav Anadkat
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Edureka!
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsRob O'Doherty
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.jsDinesh U
 
Docker cheat-sheet
Docker cheat-sheetDocker cheat-sheet
Docker cheat-sheetPeđa Delić
 
Use Node.js to create a REST API
Use Node.js to create a REST APIUse Node.js to create a REST API
Use Node.js to create a REST APIFabien Vauchelles
 
Data Persistence in Android with Room Library
Data Persistence in Android with Room LibraryData Persistence in Android with Room Library
Data Persistence in Android with Room LibraryReinvently
 
Return of the monolith
Return of the monolith Return of the monolith
Return of the monolith Alper Hankendi
 
A Deeper look into Javascript Basics
A Deeper look into Javascript BasicsA Deeper look into Javascript Basics
A Deeper look into Javascript BasicsMindfire Solutions
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript ProgrammingSehwan Noh
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Visual Engineering
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js ExpressEyal Vardi
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js SimplifiedSunil Yadav
 

Was ist angesagt? (20)

Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
JavaScript Event Loop
JavaScript Event LoopJavaScript Event Loop
JavaScript Event Loop
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
 
Node ppt
Node pptNode ppt
Node ppt
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Docker cheat-sheet
Docker cheat-sheetDocker cheat-sheet
Docker cheat-sheet
 
Use Node.js to create a REST API
Use Node.js to create a REST APIUse Node.js to create a REST API
Use Node.js to create a REST API
 
Data Persistence in Android with Room Library
Data Persistence in Android with Room LibraryData Persistence in Android with Room Library
Data Persistence in Android with Room Library
 
Return of the monolith
Return of the monolith Return of the monolith
Return of the monolith
 
A Deeper look into Javascript Basics
A Deeper look into Javascript BasicsA Deeper look into Javascript Basics
A Deeper look into Javascript Basics
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 

Ähnlich wie Node.js presentation code examples

Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to NodejsGabriele Lana
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
 
Ruby MVC from scratch with Rack
Ruby MVC from scratch with RackRuby MVC from scratch with Rack
Ruby MVC from scratch with RackDonSchado
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the wayOleg Podsechin
 
Building web framework with Rack
Building web framework with RackBuilding web framework with Rack
Building web framework with Racksickill
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Node js presentation
Node js presentationNode js presentation
Node js presentationmartincabrera
 
From Ruby to Node.js
From Ruby to Node.jsFrom Ruby to Node.js
From Ruby to Node.jsjubilem
 

Ähnlich wie Node.js presentation code examples (20)

Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to Nodejs
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talk
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
 
Ruby MVC from scratch with Rack
Ruby MVC from scratch with RackRuby MVC from scratch with Rack
Ruby MVC from scratch with Rack
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
Intro to Node
Intro to NodeIntro to Node
Intro to Node
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
 
Building web framework with Rack
Building web framework with RackBuilding web framework with Rack
Building web framework with Rack
 
Event driven programming -- Node.JS
Event driven programming -- Node.JSEvent driven programming -- Node.JS
Event driven programming -- Node.JS
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
NodeJS
NodeJSNodeJS
NodeJS
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
From Ruby to Node.js
From Ruby to Node.jsFrom Ruby to Node.js
From Ruby to Node.js
 

Mehr von Gabriele Lana

Microservice Architectures
Microservice ArchitecturesMicroservice Architectures
Microservice ArchitecturesGabriele Lana
 
Professional Programmer 2018
Professional Programmer 2018Professional Programmer 2018
Professional Programmer 2018Gabriele Lana
 
Parse Everything With Elixir
Parse Everything With ElixirParse Everything With Elixir
Parse Everything With ElixirGabriele Lana
 
Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Gabriele Lana
 
Resource Oriented Design
Resource Oriented DesignResource Oriented Design
Resource Oriented DesignGabriele Lana
 
Agileday Coderetreat 2013
Agileday Coderetreat 2013Agileday Coderetreat 2013
Agileday Coderetreat 2013Gabriele Lana
 
Milano Legacy Coderetreat 2013
Milano Legacy Coderetreat 2013Milano Legacy Coderetreat 2013
Milano Legacy Coderetreat 2013Gabriele Lana
 
Minimum Viable Product
Minimum Viable ProductMinimum Viable Product
Minimum Viable ProductGabriele Lana
 
Professional Programmer
Professional ProgrammerProfessional Programmer
Professional ProgrammerGabriele Lana
 
It is not supposed to fly but it does
It is not supposed to fly but it doesIt is not supposed to fly but it does
It is not supposed to fly but it doesGabriele Lana
 

Mehr von Gabriele Lana (20)

Microservice Architectures
Microservice ArchitecturesMicroservice Architectures
Microservice Architectures
 
Professional Programmer 2018
Professional Programmer 2018Professional Programmer 2018
Professional Programmer 2018
 
Beyond Phoenix
Beyond PhoenixBeyond Phoenix
Beyond Phoenix
 
Parse Everything With Elixir
Parse Everything With ElixirParse Everything With Elixir
Parse Everything With Elixir
 
The Magic Of Elixir
The Magic Of ElixirThe Magic Of Elixir
The Magic Of Elixir
 
Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)
 
Resource Oriented Design
Resource Oriented DesignResource Oriented Design
Resource Oriented Design
 
Agileday Coderetreat 2013
Agileday Coderetreat 2013Agileday Coderetreat 2013
Agileday Coderetreat 2013
 
Milano Legacy Coderetreat 2013
Milano Legacy Coderetreat 2013Milano Legacy Coderetreat 2013
Milano Legacy Coderetreat 2013
 
Minimum Viable Product
Minimum Viable ProductMinimum Viable Product
Minimum Viable Product
 
API Over HTTP
API Over HTTPAPI Over HTTP
API Over HTTP
 
coderetreat
coderetreatcoderetreat
coderetreat
 
Professional Programmer
Professional ProgrammerProfessional Programmer
Professional Programmer
 
It is not supposed to fly but it does
It is not supposed to fly but it doesIt is not supposed to fly but it does
It is not supposed to fly but it does
 
MongoDB With Style
MongoDB With StyleMongoDB With Style
MongoDB With Style
 
Nosql
NosqlNosql
Nosql
 
Magic of Ruby
Magic of RubyMagic of Ruby
Magic of Ruby
 
Why couchdb is cool
Why couchdb is coolWhy couchdb is cool
Why couchdb is cool
 
ProgrammingKatas
ProgrammingKatasProgrammingKatas
ProgrammingKatas
 
CouchDB Vs MongoDB
CouchDB Vs MongoDBCouchDB Vs MongoDB
CouchDB Vs MongoDB
 

Kürzlich hochgeladen

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Kürzlich hochgeladen (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Node.js presentation code examples