Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction to NodeJs
Search
Anthony Pipkin
July 24, 2014
Technology
88
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to NodeJs
High level overview of what NodeJs is and how it can do cool things.
Anthony Pipkin
July 24, 2014
More Decks by Anthony Pipkin
See All by Anthony Pipkin
Introduction to ReactJs
apipkin
2
120
Introduction to AngularJs
apipkin
1
170
Building for the new Gallery
apipkin
1
220
Other Decks in Technology
See All in Technology
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
140
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
26
15k
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
2
930
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
1
2.2k
品質と信頼性を地続きにする
grimoh
0
490
事業課題から技術的負債に向き合う
sansantech
PRO
2
1.9k
LLMに渡さなかった仕事
nanaism
0
400
おい、エージェントを使って終わらせろ
nwiizo
1
570
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
1
1.6k
生成AIエージェントを用いた、 手動テスト手順書から自動テストへの 変換手法の検討
magicpod
0
160
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
5
2.7k
HHKBエバンジェリストになる方法
941
0
110
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Technical Leadership for Architectural Decision Making
baasie
3
570
The Curious Case for Waylosing
cassininazir
1
510
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Making Projects Easy
brettharned
120
6.8k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Writing Fast Ruby
sferik
630
63k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Exploring anti-patterns in Rails
aemeredith
4
510
Code Review Best Practice
trishagee
74
20k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Transcript
Hello, my name is node.js but you may call me
"node"
Before We Start
We need: Knowledge of JavaScript Web Browser Terminal
What about help? nodejs.org docs #node.js on Freenode IRC StackOverflow
General searching for javascript, node.js, or npm
What is Node?
According to Node Node's goal is to provide an easy
way to build scalable network programs
According to me NodeJs is a super awesome tool that
allows me to take over the world.
But seriously... JavaScript ECMAScript 5 No ugly DOM! Built on
top of V8 Single threaded Asynchronous, non-blocking I/O Windows, Mac, Linux
Let's get started!
Step 1 Go to http://nodejs.org Click the `install` button. Follow
the instructions.
Step 2 Gain an understanding of: Prototypal Inheritance Closures Event
Loop
Step 2a JavaScript the Good Parts - Douglas Crockford http://livestre.am/JC3U
or http://amzn.com/B002AWX8BO Eloquent JavaScript - Marijn Haverbeke http://eloquentjavascript.net/ JavaScript Design Patterns - Addy Osmani http://addyosmani.com/resources/essentialjsdesignpatterns/book
Step 3
Step 4 Profit Global Domination You get the point
Doing Good with NodeJs Event Driven Promises Callbacks
Event Driven require('events') Extend with EventEmitter Simple API on once
removeListener removeAllListeners emit
Promises Relatively new to JavaScript promisejs.org npm packages q promised-io
deferred promise.then(successFn, errorFn, progressFn)
Callbacks `(err, data)` pattern `.bind` to maintain scope ( )
maintains variables where defined http://www.digital-web.com/articles/scope_in_javascript/ More on JavaScript patterns in the online book(s).
Package Management npm 85,000+ packages Packages can be global or
isolated to project
Building Packages npm init package.json configuration for node module dependency
information command line load point (`bin`) npm install module npm install module --save Saved in ./node_modules/
Usage require('mod') core or npm require('./mod') relative to app require('/home/mod')
absolute from drive
Command Line which node HashBang (#!) path +x the js
file to it's executable make it installable via npm
Demo!
Web Server & Apps http clusters, PM2 ExpressJs, HapiJs, Restify
Socket.io ( ) nodemon database MongoDb MySQL Postgres http://caniuse.com/websockets
Demo!
Don't Use Node for... Number Crunching (IEEE 754 "Double") 0.1
+ 0.2 === 0.3 // false Synchronous I/O calls Shell Scripting * Making toast ? ( ) http://youtu.be/MqHDDtVYJRI http://survivejs.com/current_state/might_run_on_toaster.html
Thanks! Me: Anthony Pipkin @apipkin http://a.pipk.in http://github.com/apipkin http://linkedin.com/in/apipkin Questions?
Interesting Links http://www.toptal.com/javascript/guide-to-full-stack- javascript-initjs http://www.toptal.com/nodejs/why-the-hell-would-i-use- node-js http://wintellect.com/blogs/dbanister/stop-fighting-node.js- in-the-enterprise