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
My Daily Node
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
@hotchemi
May 19, 2013
Programming
990
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
My Daily Node
LT at js-cafe vol7
@hotchemi
May 19, 2013
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
290
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.5k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.2k
Type-Safe i18n on RN
hotchemi
2
1.2k
Navigation in a hybrid app
hotchemi
3
1.4k
PermissionsDispatcher × Kotlin
hotchemi
0
3.4k
kotlin compiler plugin
hotchemi
1
820
Rx and Preferences
hotchemi
2
180
Introducing PermissionsDispatcher
hotchemi
1
180
Other Decks in Programming
See All in Programming
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.8k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
Creating Composable Callables in Contemporary C++
rollbear
0
160
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
180
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
300
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
12
6.5k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
590
RTSPクライアントを自作してみた話
simotin13
0
630
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
240
The browser strikes back
jonoalderson
0
1.3k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
210
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Being A Developer After 40
akosma
91
590k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Unsuck your backbone
ammeep
672
58k
Practical Orchestrator
shlominoach
191
11k
Transcript
My Daily Node js-cafe vol7 શ෦JavaScriptͰॻ͜͏ @hotchemi
Shintaro Katafuchi ŋProgrammer at TIS ŋTwitter: @hotchemi ŋGitHub: hotchemi
օ͞ΜŊJavaScriptॻ͍ͯ·͔͢ʁ
େͷϓϩάϥϚͷΈ ŋňJavaScriptΛॻ͘ػձ͕ແ͍…ʼn ŋňࣄͰαʔόαΠυ͔Γͩ͠ʼn ŋňͲ͔͜ΒJavaScirptΛ࢝ΊͨΒྑ͍ͷ͔…ʼn ŋňWebαʔϏεΛҰਓͰ࡞Δͷͪΐͬͱ…ʼn
ͦ͜ͰNode.jsͰ͢Α ŋSingle thread, Sockei.IO, ඇಉظ, C10K… ŋNode.jsͷϋʔυϧ࣮ߴ͘ͳ͍ ŋJavaScriptʹ׳Ε͍ͨਓͦ͜NodeΛॻ͖͘ ※ࠓJavaScriptॳ৺ऀ͕ͩͬͨࣗŊNodeΛͬͯΛղܾͨ͠ࣄྫŊnpmϞδϡʔ ϧΛެ։ͯ͠ΈͨମݧΛ͓͠·͢Ň
My idea is…
1. ΫϥΠΞϯταΠυͷςετΛCI scroll-to simple scroll jquery plugin. ŋmocha+expect.js+travis-ci(phantomjs) ŋΫϥΠΞϯταΠυͷςετ͕CIͰ͖Δ https://github.com/hotchemi/scroll-to
None
My idea is…
2. αόΫϥ྆༻ϥΠϒϥϦΛ։ൃ private.js provides private accessor library. ŋmocha+expect.js ŋNodeͰλʔϛφϧܦ༝ͰTDD https://github.com/hotchemi/private.js
var klass = $pvt("_" /* prefix */, { // public
method access to public variable getPublicVariable: function() { return this.publicVariable; }, // public method access to private variable getPrivatevariable: function() { return _privateVariable; }, // privateϝϯόΛࢀর͍ͯ͠ΔprivateϝιουΛݺͼग़͢public method getPrivateMethodReferPrivateVariable: function() { return _getPrivateVariable(); }, // publicϝϯόΛࢀর͍ͯ͠ΔprivateϝιουΛݺͼग़͢public method getPrivateMethodReferPublicVariable: function() { // ͜ͷ߹ίϯςΩετΛࢦఆ͠ͳ͍ͱ͍͚ͳ͍… return _getPublicVariable.call(this); }, // privateϝϯόʹΞΫηε͢Δprivate method _getPrivateVariable: function() { return _privateVariable; }, // publicϝϯόʹΞΫηε͢Δprivate method _getPublicVariable: function() { return this.publicVariable; }, // public variable publicVariable: 1, // private variable _privateVariable: 2 }); Usage
My idea is…
3. APIϥούʔΛ։ൃ zaim.js Zaim API wrapper. ŋNodeͷAPIϥούʔແ͔ͬͨ→ň࡞Ζ͏ʂʼn ŋCoverallsΛͬͯΧόϨοδΛܭଌ https://github.com/hotchemi/zaim.js
npm install zaim NodeϞδϡʔϧ։ൃૂ͍ʂ
My idea is…
4. γΣϧΞϓϦNodeͰॻ͘ zaim-cli CLI based Zaim client. ŋrequire commander, colors.js,
zaim.js ŋDirty code...callback is difficult. https://github.com/hotchemi/zaim-cli
npm install -g zaim-cli
My idea is…
5. ωλهࣄ͢ΒNodeͰॻ͘ yutori-blog-bot twitter bot for @megascus. ŋΏͱΓ advent calendar
15 ŋRunnning on eXcale https://github.com/hotchemi/yutori-blog-bot
None
eXcale support Node.js
NodeΛͬͯྑ͔ͬͨࣄ ŋJavaScriptͷςετͷҙ͕ࣝߴ·Δ ŋඇಉظͷҙ͕ࣝߴ·Δ ŋCallbackࠈͷ͚ͩڧ͘ͳΕΔΑ ŋnpmϞδϡʔϧΛ؆୯ʹެ։Ͱ͖Δ ŋ͍ͭͷؒʹ͔JavaScriptΛ͖ʹͳͬͯΔ
Let’s Node!! (JWFNFQVMMSFRVFTU Fin.