SlideShare uma empresa Scribd logo
1 de 18
Introducing Node.js
About Your Speaker
What Is It?

Server side javascript framework

Written using Google V8 Engine

Uses CommonJS module system

Has the latest and greatest Ecmascript5
features
Non-Blocking I/O

The philosophy behind node.js is that system
interactions should be non-blocking

Instead of this:
var data = fs.readFile('foo.txt')
console.log(data);

This:
fs.readFile('foo.txt', function(data){
console.log(data);
});

This whole operation is asynchronous... my
application doesn't have to wait for the file to be
read in

Using javascript to do this makes it easier to
adopt given the existing knowledge of using
callbacks and listeners on the client side
Event Driven Architecture

This leads to a more event driven approach

Rather than returning something, calls should
try to either
− Call a callback passed in
− Fire events that the caller listens for

Built in event system (EventEmitter)
− emitter.emit('data-recvd', evt)
− emitter.on('data-recvd', function(evt){
});
Ecmascript 5 Features
Ecmascript 5 Features

Array Extras
− Map, reduce, forEach, filter, every, some

JSON

Object Utilities

Object.getOwnPropertyNames

Object.create

Object.defineProperties

Object.getOwnPropertyDescriptor

Immutibility
− Object.freeze, Object.seal
Ecmascript 5 Features

Getters/setters

Function.prototype.bind
− Allows you to create a new function with the
argument(s) pre-set
− Example
function add(a,b){
return a+b;
}
var fivePlus = add.bind(5)
console.log(fivePlus(2)); // prints 7
Examples

Enough talking, let's see some examples
− Some file and process interaction
− A simple webserver
− Reverse proxy
− Websockets
− AMQP to integrate with existing applications
Getting Started

Runs on nix and cygwin (no windows support
yet)

Install the latest stable from nodejs.org
− Sorry, no installer. You'll need to build it
yourself

Try the commandline repl out. If all is well,
you're good to go!

Hack away
npm

Ruby has gem, node has npm (node package
manager)

This is a must have for node.js development
− http://npmjs.org

Quick Install:
− curl http://npmjs.org/install.sh | sh

Can also be used to budle up your application's
dependencies
Modules of Note

Some interesting modules to take note of and
try out
− Express – simple sintatra clone (a dime a
dozen these days)
− Vows – async BDD in javascript
− Socket.IO – websockets made easy
− Yui3 – adaption of YUI for node.js
− SEVERAL NoSQL modules

Riak, redis, couchDB, mongoDB, tokyo cabinet,
etc.
Hosting Options

Heroku (closed beta)

Joyent (open beta)

Nodjitsu (launching soon)

DIY (EC2, your own server, etc)
Cons

Evolving rapidly.
− It's not uncommon to see tutorials from
several months ago that no longer work

Not very cross platform (yet)

Lots of duplicate modules
− Not that this is a bad thing, but for example
there are TEN couchdb modules (because
couchdb wrappers are simple to make)

No clustering support yet
Clustering Support

No real support yet, but it's on the way!
− EventEmitters backed by websockets
− Another using Redis built-in publish/subscribe
mechanisms
− I've been hacking at EventEmitters backed by
AMQP
Users
Join the Community!

irc.freenode.net #node.js

Google Groups node.js

File bugs/suggest features

Use and Contribute!

Mais conteúdo relacionado

Mais procurados

Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...Péhápkaři
 
Node in Real Time - The Beginning
Node in Real Time - The BeginningNode in Real Time - The Beginning
Node in Real Time - The BeginningAxilis
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Devang Garach
 
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 MongoDBHengki Sihombing
 
Построение простого REST сервера на Node.js | Odessa Frontend Code challenge
Построение простого REST сервера на Node.js | Odessa Frontend Code challengeПостроение простого REST сервера на Node.js | Odessa Frontend Code challenge
Построение простого REST сервера на Node.js | Odessa Frontend Code challengeOdessaFrontend
 
Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day Plain Concepts
 
Supercharge your next Vue app with Nuxt
Supercharge your next Vue app with NuxtSupercharge your next Vue app with Nuxt
Supercharge your next Vue app with NuxtThe Software House
 
Understanding Non Blocking I/O with Python
Understanding Non Blocking I/O with PythonUnderstanding Non Blocking I/O with Python
Understanding Non Blocking I/O with PythonVaidik Kapoor
 
Analysis of an exploited npm package
Analysis of an exploited npm packageAnalysis of an exploited npm package
Analysis of an exploited npm packageParth Parmar
 
Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackShapeBlue
 
Nginx+ Naxsi
Nginx+ NaxsiNginx+ Naxsi
Nginx+ Naxsi3camp
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialTom Croucher
 
Quick Introduction to Node.js
Quick Introduction to Node.jsQuick Introduction to Node.js
Quick Introduction to Node.jsNaing Lin Aung
 
FreeBSD preseed installation (PXE) AsiaBSDCon 2015
FreeBSD preseed installation (PXE) AsiaBSDCon 2015FreeBSD preseed installation (PXE) AsiaBSDCon 2015
FreeBSD preseed installation (PXE) AsiaBSDCon 2015Kamil Czekirda
 
Multi-core Node.pdf
Multi-core Node.pdfMulti-core Node.pdf
Multi-core Node.pdfAhmed Hassan
 

Mais procurados (20)

Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
 
Node in Real Time - The Beginning
Node in Real Time - The BeginningNode in Real Time - The Beginning
Node in Real Time - The Beginning
 
Ansible & Vagrant
Ansible & VagrantAnsible & Vagrant
Ansible & Vagrant
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
 
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
 
Построение простого REST сервера на Node.js | Odessa Frontend Code challenge
Построение простого REST сервера на Node.js | Odessa Frontend Code challengeПостроение простого REST сервера на Node.js | Odessa Frontend Code challenge
Построение простого REST сервера на Node.js | Odessa Frontend Code challenge
 
Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day
 
NodeJS overview
NodeJS overviewNodeJS overview
NodeJS overview
 
Supercharge your next Vue app with Nuxt
Supercharge your next Vue app with NuxtSupercharge your next Vue app with Nuxt
Supercharge your next Vue app with Nuxt
 
Capistrano && SystemD
Capistrano && SystemDCapistrano && SystemD
Capistrano && SystemD
 
Understanding Non Blocking I/O with Python
Understanding Non Blocking I/O with PythonUnderstanding Non Blocking I/O with Python
Understanding Non Blocking I/O with Python
 
Analysis of an exploited npm package
Analysis of an exploited npm packageAnalysis of an exploited npm package
Analysis of an exploited npm package
 
Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStack
 
Nginx+ Naxsi
Nginx+ NaxsiNginx+ Naxsi
Nginx+ Naxsi
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
Introduction to Penetration Testing
Introduction to Penetration TestingIntroduction to Penetration Testing
Introduction to Penetration Testing
 
Quick Introduction to Node.js
Quick Introduction to Node.jsQuick Introduction to Node.js
Quick Introduction to Node.js
 
FreeBSD preseed installation (PXE) AsiaBSDCon 2015
FreeBSD preseed installation (PXE) AsiaBSDCon 2015FreeBSD preseed installation (PXE) AsiaBSDCon 2015
FreeBSD preseed installation (PXE) AsiaBSDCon 2015
 
Deep dive-oz
Deep dive-ozDeep dive-oz
Deep dive-oz
 
Multi-core Node.pdf
Multi-core Node.pdfMulti-core Node.pdf
Multi-core Node.pdf
 

Destaque

Policy overview unam 120522
Policy overview unam 120522Policy overview unam 120522
Policy overview unam 120522Eve Gray
 
Palm internationalreport 201000922
Palm internationalreport 201000922Palm internationalreport 201000922
Palm internationalreport 201000922Eve Gray
 
Contextualizing Policy Developments in Open Knowledge in South Africa
Contextualizing  Policy Developments in Open  Knowledge in South AfricaContextualizing  Policy Developments in Open  Knowledge in South Africa
Contextualizing Policy Developments in Open Knowledge in South AfricaEve Gray
 
Publishing Development Research and Adding Value
Publishing Development Research and Adding ValuePublishing Development Research and Adding Value
Publishing Development Research and Adding ValueEve Gray
 
Introduction to nodejs
Introduction to nodejsIntroduction to nodejs
Introduction to nodejsJames Carr
 
Dealing in Disruption - OA policy in an African context
Dealing in Disruption - OA policy in an African contextDealing in Disruption - OA policy in an African context
Dealing in Disruption - OA policy in an African contextEve Gray
 
The Changing Journal Landscape
The Changing Journal Landscape The Changing Journal Landscape
The Changing Journal Landscape Eve Gray
 
Scholarly Publishing in Africa - Namibia
Scholarly Publishing in Africa - NamibiaScholarly Publishing in Africa - Namibia
Scholarly Publishing in Africa - NamibiaEve Gray
 
Codesria Conference on Electronic Publishing 2016
Codesria Conference on Electronic Publishing 2016 Codesria Conference on Electronic Publishing 2016
Codesria Conference on Electronic Publishing 2016 Eve Gray
 
OA 2013 - A Broader Vision of Open Access for Development
OA 2013 - A Broader Vision of Open Access for Development OA 2013 - A Broader Vision of Open Access for Development
OA 2013 - A Broader Vision of Open Access for Development Eve Gray
 
Open Access in 2012 – a developing country perspective
Open Access in 2012 – a developing country perspectiveOpen Access in 2012 – a developing country perspective
Open Access in 2012 – a developing country perspectiveEve Gray
 
OA and the Decolonization of the university in Africa 2016
OA and the Decolonization of the university in Africa 2016 OA and the Decolonization of the university in Africa 2016
OA and the Decolonization of the university in Africa 2016 Eve Gray
 
Open Access Week 2009 University of the Western Cape
Open Access Week 2009 University of the Western CapeOpen Access Week 2009 University of the Western Cape
Open Access Week 2009 University of the Western CapeEve Gray
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQJames Carr
 

Destaque (19)

Policy overview unam 120522
Policy overview unam 120522Policy overview unam 120522
Policy overview unam 120522
 
Palm internationalreport 201000922
Palm internationalreport 201000922Palm internationalreport 201000922
Palm internationalreport 201000922
 
Contextualizing Policy Developments in Open Knowledge in South Africa
Contextualizing  Policy Developments in Open  Knowledge in South AfricaContextualizing  Policy Developments in Open  Knowledge in South Africa
Contextualizing Policy Developments in Open Knowledge in South Africa
 
Portfolio Sculptures 2007
Portfolio Sculptures 2007Portfolio Sculptures 2007
Portfolio Sculptures 2007
 
Publishing Development Research and Adding Value
Publishing Development Research and Adding ValuePublishing Development Research and Adding Value
Publishing Development Research and Adding Value
 
Introduction to nodejs
Introduction to nodejsIntroduction to nodejs
Introduction to nodejs
 
Wsp Deck Games
Wsp Deck GamesWsp Deck Games
Wsp Deck Games
 
Dealing in Disruption - OA policy in an African context
Dealing in Disruption - OA policy in an African contextDealing in Disruption - OA policy in an African context
Dealing in Disruption - OA policy in an African context
 
The Changing Journal Landscape
The Changing Journal Landscape The Changing Journal Landscape
The Changing Journal Landscape
 
Scholarly Publishing in Africa - Namibia
Scholarly Publishing in Africa - NamibiaScholarly Publishing in Africa - Namibia
Scholarly Publishing in Africa - Namibia
 
Think
ThinkThink
Think
 
Codesria Conference on Electronic Publishing 2016
Codesria Conference on Electronic Publishing 2016 Codesria Conference on Electronic Publishing 2016
Codesria Conference on Electronic Publishing 2016
 
OA 2013 - A Broader Vision of Open Access for Development
OA 2013 - A Broader Vision of Open Access for Development OA 2013 - A Broader Vision of Open Access for Development
OA 2013 - A Broader Vision of Open Access for Development
 
Rom
RomRom
Rom
 
Open Access in 2012 – a developing country perspective
Open Access in 2012 – a developing country perspectiveOpen Access in 2012 – a developing country perspective
Open Access in 2012 – a developing country perspective
 
OA and the Decolonization of the university in Africa 2016
OA and the Decolonization of the university in Africa 2016 OA and the Decolonization of the university in Africa 2016
OA and the Decolonization of the university in Africa 2016
 
Open Access Week 2009 University of the Western Cape
Open Access Week 2009 University of the Western CapeOpen Access Week 2009 University of the Western Cape
Open Access Week 2009 University of the Western Cape
 
Mockito
MockitoMockito
Mockito
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
 

Semelhante a Intro to Node.js

Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDDSudar Muthu
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Intro To Node.js
Intro To Node.jsIntro To Node.js
Intro To Node.jsChris Cowan
 
Node js presentation
Node js presentationNode js presentation
Node js presentationshereefsakr
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsGary Yeh
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS MeetupLINAGORA
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comVan-Duyet Le
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introductionPrasoon Kumar
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppEdureka!
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Ganesh Kondal
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tourcacois
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed AssafAhmed Assaf
 

Semelhante a Intro to Node.js (20)

Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDD
 
Node js meetup
Node js meetupNode js meetup
Node js meetup
 
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
 
Node.js essentials
 Node.js essentials Node.js essentials
Node.js essentials
 
Nodejs
NodejsNodejs
Nodejs
 
Intro To Node.js
Intro To Node.jsIntro To Node.js
Intro To Node.js
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
Node js
Node jsNode js
Node js
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.com
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introduction
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 

Último

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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...Miguel Araújo
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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 AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Intro to Node.js

  • 3. What Is It?  Server side javascript framework  Written using Google V8 Engine  Uses CommonJS module system  Has the latest and greatest Ecmascript5 features
  • 4. Non-Blocking I/O  The philosophy behind node.js is that system interactions should be non-blocking  Instead of this: var data = fs.readFile('foo.txt') console.log(data);  This: fs.readFile('foo.txt', function(data){ console.log(data); });
  • 5.  This whole operation is asynchronous... my application doesn't have to wait for the file to be read in  Using javascript to do this makes it easier to adopt given the existing knowledge of using callbacks and listeners on the client side
  • 6. Event Driven Architecture  This leads to a more event driven approach  Rather than returning something, calls should try to either − Call a callback passed in − Fire events that the caller listens for  Built in event system (EventEmitter) − emitter.emit('data-recvd', evt) − emitter.on('data-recvd', function(evt){ });
  • 8. Ecmascript 5 Features  Array Extras − Map, reduce, forEach, filter, every, some  JSON  Object Utilities  Object.getOwnPropertyNames  Object.create  Object.defineProperties  Object.getOwnPropertyDescriptor  Immutibility − Object.freeze, Object.seal
  • 9. Ecmascript 5 Features  Getters/setters  Function.prototype.bind − Allows you to create a new function with the argument(s) pre-set − Example function add(a,b){ return a+b; } var fivePlus = add.bind(5) console.log(fivePlus(2)); // prints 7
  • 10. Examples  Enough talking, let's see some examples − Some file and process interaction − A simple webserver − Reverse proxy − Websockets − AMQP to integrate with existing applications
  • 11. Getting Started  Runs on nix and cygwin (no windows support yet)  Install the latest stable from nodejs.org − Sorry, no installer. You'll need to build it yourself  Try the commandline repl out. If all is well, you're good to go!  Hack away
  • 12. npm  Ruby has gem, node has npm (node package manager)  This is a must have for node.js development − http://npmjs.org  Quick Install: − curl http://npmjs.org/install.sh | sh  Can also be used to budle up your application's dependencies
  • 13. Modules of Note  Some interesting modules to take note of and try out − Express – simple sintatra clone (a dime a dozen these days) − Vows – async BDD in javascript − Socket.IO – websockets made easy − Yui3 – adaption of YUI for node.js − SEVERAL NoSQL modules  Riak, redis, couchDB, mongoDB, tokyo cabinet, etc.
  • 14. Hosting Options  Heroku (closed beta)  Joyent (open beta)  Nodjitsu (launching soon)  DIY (EC2, your own server, etc)
  • 15. Cons  Evolving rapidly. − It's not uncommon to see tutorials from several months ago that no longer work  Not very cross platform (yet)  Lots of duplicate modules − Not that this is a bad thing, but for example there are TEN couchdb modules (because couchdb wrappers are simple to make)  No clustering support yet
  • 16. Clustering Support  No real support yet, but it's on the way! − EventEmitters backed by websockets − Another using Redis built-in publish/subscribe mechanisms − I've been hacking at EventEmitters backed by AMQP
  • 17. Users
  • 18. Join the Community!  irc.freenode.net #node.js  Google Groups node.js  File bugs/suggest features  Use and Contribute!