Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to NodeJs
Search
Anthony Pipkin
July 24, 2014
Technology
0
74
Introduction to NodeJs
High level overview of what NodeJs is and how it can do cool things.
Anthony Pipkin
July 24, 2014
Tweet
Share
More Decks by Anthony Pipkin
See All by Anthony Pipkin
Introduction to ReactJs
apipkin
2
110
Introduction to AngularJs
apipkin
1
160
Building for the new Gallery
apipkin
1
200
Other Decks in Technology
See All in Technology
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
140
AIチャットボット開発への生成AI活用
ryomrt
0
150
第23回Ques_タイミーにおけるQAチームの在り方 / QA Team in Timee
takeyaqa
0
270
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
250
Intuneお役立ちツールのご紹介
sukank
3
770
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
120
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
370
AWS⼊社という選択肢、⾒えていますか
iwamot
2
1.1k
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
140
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
1
140
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
GraphQLとの向き合い方2022年版
quramy
43
13k
For a Future-Friendly Web
brad_frost
175
9.4k
Designing for Performance
lara
604
68k
A Philosophy of Restraint
colly
203
16k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Code Review Best Practice
trishagee
64
17k
Practical Orchestrator
shlominoach
186
10k
Code Reviewing Like a Champion
maltzj
520
39k
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