SlideShare une entreprise Scribd logo
1  sur  49
node.js
      Jakub Nesetril
jakub.nesetril@gmail.com
Who Are You?
Who Are You?

• JS
Who Are You?

• JS
• Ruby
Who Are You?

• JS
• Ruby
• web
Who Are You?

• JS
• Ruby
• web
• what real language do you speak?
TOC
TOC

• blocking vs. non-blocking intro
TOC

• blocking vs. non-blocking intro
• short introduction to node.js
TOC

• blocking vs. non-blocking intro
• short introduction to node.js
• examples
TOC

• blocking vs. non-blocking intro
• short introduction to node.js
• examples
• Q&A
Tags
Tags
• #javascript , #v8 , #ssjs
Tags
• #javascript , #v8 , #ssjs
• #event-oriented
Tags
• #javascript , #v8 , #ssjs
• #event-oriented
• #high-performance
Tags
• #javascript , #v8 , #ssjs
• #event-oriented
• #high-performance
• #asynchronous , #non-blocking
Tags
• #javascript , #v8 , #ssjs
• #event-oriented
• #high-performance
• #asynchronous , #non-blocking
• #low-level
Tags
• #javascript , #v8 , #ssjs
• #event-oriented
• #high-performance
• #asynchronous , #non-blocking
• #low-level
• #fun!
What’s missing?
Tags
• #javascript , #v8 , #ssjs
• #event-oriented
• #high-performance
• #asynchronous , #non-blocking
• #low-level
• #stable , #mature (not!)
(non-) Blocking IO
(non-) Blocking IO


• var rows = db.query(“SELECT * FROM…)
(non-) Blocking IO


• var rows = db.query(“SELECT * FROM…)
• rows.forEach…
(non-) Blocking IO


• db.query(“SELECT * FROM…”,
    function(rows) { rows.forEach… });
Why isn’t everybody
     doing it?
Why isn’t everybody
      doing it?
• non-blocking can be hard
Why isn’t everybody
      doing it?
• non-blocking can be hard
• JS is an ideal language / community for this
Why isn’t everybody
      doing it?
• non-blocking can be hard
• JS is an ideal language / community for this
• Ajax / DOM has taught events to millions
  of people
Why isn’t everybody
      doing it?
• non-blocking can be hard
• JS is an ideal language / community for this
• Ajax / DOM has taught events to millions
  of people
• node.js = network servers in JS
Example 1
Design Principles
Design Principles
• non-blocking - every IO must take callback
Design Principles
• non-blocking - every IO must take callback
• API should be familiar to client-side JS
  programmers ans old school UNIX hackers
Design Principles
• non-blocking - every IO must take callback
• API should be familiar to client-side JS
  programmers ans old school UNIX hackers
• built-in support for HTTP, DNS, TLS
Design Principles
• non-blocking - every IO must take callback
• API should be familiar to client-side JS
  programmers ans old school UNIX hackers
• built-in support for HTTP, DNS, TLS
• support advanced features (chunked
  encoding, pipelining, hanging requests for
  websockets etc.)
Example 2
Ecosystem
Ecosystem

• node modules (CommonJS)
Ecosystem

• node modules (CommonJS)
• npm
Ecosystem

• node modules (CommonJS)
• npm
• connect & express
Ecosystem

• node modules (CommonJS)
• npm
• connect & express
• node-inspector
Ecosystem

• node modules (CommonJS)
• npm
• connect & express
• node-inspector
• bounce
Advanced Topics
Advanced Topics

• WebSockets
Advanced Topics

• WebSockets
• Server-side DOM
Advanced Topics

• WebSockets
• Server-side DOM
• Performance
Advanced Topics

• WebSockets
• Server-side DOM
• Performance
• Hosting
NodeKnockout
Q&A

Contenu connexe

Tendances

Be German About Your Frontend
Be German About Your FrontendBe German About Your Frontend
Be German About Your Frontend
Arush Sehgal
 

Tendances (11)

Let's unRiddle jsFiddle
Let's unRiddle jsFiddleLet's unRiddle jsFiddle
Let's unRiddle jsFiddle
 
Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)
 
The Realtime Web: Stateful and Programmable
The Realtime Web: Stateful and ProgrammableThe Realtime Web: Stateful and Programmable
The Realtime Web: Stateful and Programmable
 
Node JS
Node JSNode JS
Node JS
 
かぼすのLTの資料
かぼすのLTの資料かぼすのLTの資料
かぼすのLTの資料
 
Fun Learning Web Scraping - QueensJS - 9/2/2015
Fun Learning Web Scraping - QueensJS - 9/2/2015Fun Learning Web Scraping - QueensJS - 9/2/2015
Fun Learning Web Scraping - QueensJS - 9/2/2015
 
Wwcode2
Wwcode2Wwcode2
Wwcode2
 
下吧开发总结
下吧开发总结下吧开发总结
下吧开发总结
 
Be German About Your Frontend
Be German About Your FrontendBe German About Your Frontend
Be German About Your Frontend
 
Java script fundamental - Introduction to JavaScript Programming Language
Java script fundamental - Introduction to JavaScript Programming LanguageJava script fundamental - Introduction to JavaScript Programming Language
Java script fundamental - Introduction to JavaScript Programming Language
 
2016-05-12 DCRUG React.rb
2016-05-12 DCRUG React.rb2016-05-12 DCRUG React.rb
2016-05-12 DCRUG React.rb
 

En vedette

Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
Sang Cù
 
NodeJS, CoffeeScript & Real-time Web
NodeJS, CoffeeScript & Real-time WebNodeJS, CoffeeScript & Real-time Web
NodeJS, CoffeeScript & Real-time Web
Jakub Nesetril
 
Avoiding API Waterfalls
Avoiding API WaterfallsAvoiding API Waterfalls
Avoiding API Waterfalls
Jakub Nesetril
 
Budoucnost Web Aplikaci
Budoucnost Web AplikaciBudoucnost Web Aplikaci
Budoucnost Web Aplikaci
Jakub Nesetril
 
Introduction to GoodData BI PaaS
Introduction to GoodData BI PaaSIntroduction to GoodData BI PaaS
Introduction to GoodData BI PaaS
Jakub Nesetril
 

En vedette (20)

Create a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBCreate a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDB
 
High Performance JavaScript
High Performance JavaScriptHigh Performance JavaScript
High Performance JavaScript
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
 
Post-REST Manifesto
Post-REST ManifestoPost-REST Manifesto
Post-REST Manifesto
 
Consuming API description languages - Refract & Minim
Consuming API description languages - Refract & MinimConsuming API description languages - Refract & Minim
Consuming API description languages - Refract & Minim
 
NodeJS, CoffeeScript & Real-time Web
NodeJS, CoffeeScript & Real-time WebNodeJS, CoffeeScript & Real-time Web
NodeJS, CoffeeScript & Real-time Web
 
Harmony in API Design
Harmony in API DesignHarmony in API Design
Harmony in API Design
 
Startup Accelerators
Startup AcceleratorsStartup Accelerators
Startup Accelerators
 
Avoiding API Waterfalls
Avoiding API WaterfallsAvoiding API Waterfalls
Avoiding API Waterfalls
 
Budoucnost Web Aplikaci
Budoucnost Web AplikaciBudoucnost Web Aplikaci
Budoucnost Web Aplikaci
 
Introduction to GoodData BI PaaS
Introduction to GoodData BI PaaSIntroduction to GoodData BI PaaS
Introduction to GoodData BI PaaS
 
Art of Building APIs
Art of Building APIsArt of Building APIs
Art of Building APIs
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
 
REST API tools
REST API toolsREST API tools
REST API tools
 
Advanced Regular Expressions Redux
Advanced Regular Expressions ReduxAdvanced Regular Expressions Redux
Advanced Regular Expressions Redux
 
GoodData: One Stop Shop for Analytics
GoodData: One Stop Shop for AnalyticsGoodData: One Stop Shop for Analytics
GoodData: One Stop Shop for Analytics
 
Let's Have a Cup of CoffeeScript
Let's Have a Cup of CoffeeScriptLet's Have a Cup of CoffeeScript
Let's Have a Cup of CoffeeScript
 
Node at Apiary.io
Node at Apiary.ioNode at Apiary.io
Node at Apiary.io
 
API Design Workflows
API Design WorkflowsAPI Design Workflows
API Design Workflows
 
Apiary
ApiaryApiary
Apiary
 

Similaire à Introduction to node.js

Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
Avi Kedar
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
Tim Sommer
 
Node js quick tour v2
Node js quick tour v2Node js quick tour v2
Node js quick tour v2
Wyatt Fang
 

Similaire à Introduction to node.js (20)

Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
oscon2011fb
oscon2011fboscon2011fb
oscon2011fb
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
 
Full Stack Developer Course | Infinite Graphix Technologies
Full Stack Developer Course | Infinite Graphix TechnologiesFull Stack Developer Course | Infinite Graphix Technologies
Full Stack Developer Course | Infinite Graphix Technologies
 
Scaling with swagger
Scaling with swaggerScaling with swagger
Scaling with swagger
 
Web APIs in Node.js Core: Past, Present, and Future (JSConf EU 2019)
Web APIs in Node.js Core: Past, Present, and Future (JSConf EU 2019)Web APIs in Node.js Core: Past, Present, and Future (JSConf EU 2019)
Web APIs in Node.js Core: Past, Present, and Future (JSConf EU 2019)
 
My Little Webap - DevOpsSec is Magic
My Little Webap - DevOpsSec is MagicMy Little Webap - DevOpsSec is Magic
My Little Webap - DevOpsSec is Magic
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
 
みんなのNode.js
みんなのNode.jsみんなのNode.js
みんなのNode.js
 
Node.js, for architects - OpenSlava 2013
Node.js, for architects - OpenSlava 2013Node.js, for architects - OpenSlava 2013
Node.js, for architects - OpenSlava 2013
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2
 
Node js quick tour v2
Node js quick tour v2Node js quick tour v2
Node js quick tour v2
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's Architecture
 
20120514 nodejsdublin
20120514 nodejsdublin20120514 nodejsdublin
20120514 nodejsdublin
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJS
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
The Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievThe Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey Vasiliev
 
Usersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJS
 
Node.js for .NET Developers
Node.js for .NET DevelopersNode.js for .NET Developers
Node.js for .NET Developers
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Introduction to node.js

Notes de l'éditeur

  1. Example 0 - async switch lines and test
  2. Example 1 - server Example 2 - dns show node API docs
  3. modules example, node modules, npm
  4. modules example, node modules, npm
  5. modules example, node modules, npm
  6. modules example, node modules, npm
  7. modules example, node modules, npm
  8. Scrabbly (http://scrabb.ly/), Swarmnation (http://swarmation.com/), Serrano (http://starcraft2destroyedmymarrage.no.de/)