色々な資料置き場.
mironal / slide Goto Github PK
View Code? Open in Web Editor NEWスライド達. 閲覧は ->
Home Page: http://mironal.github.io
スライド達. 閲覧は ->
Home Page: http://mironal.github.io
色々な資料置き場.
nodeは非同期プログラミング
-結果をどのように受け取るか?
-以下の2種類がある
-- イベントリスナ
-- コールバック
-- requestの時にnode.jsをそのままのやり方がイベントリスナ
---- 何回も結果が発生するような処理結果をもらうときに使ったりする.
---- もしくは通常のコンテキスト以外で発生するエラーとか(処理とは非同期にエラーが発生する類のもの).
-- request.jsを使ったやり方がコールバック
-- コールバックのほうがよく使われている気がする
----通常はなにか計算→結果を取得っていうパターンが多い
また、node.jsではコールバック関数に以下のルールがある
---第一引数はエラーの為に予約されている.
-- request.jsもそうなっていた。
---underscore.jsはそもそも非同期な設計になっていないので関係ない
http://nodeguide.com/style.html#callbacks
コールバックの良くない所
-- あれやって、これやってと処理をつなげていくとネストが深くなり可読性が悪くなる。
--- スコープもよくわからんことになる。
そこでasync.js
async.jsを導入して…
ネストが深くならなくなって彼女が出来ました
他のコールバック形式のAPIとの親和性が高くて収入アップ!
という感じになります。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.