Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

この書籍で扱う内容について #1

Closed
wants to merge 7 commits into from
Closed

この書籍で扱う内容について #1

wants to merge 7 commits into from

Conversation

azu
Copy link
Owner

@azu azu commented Mar 5, 2014

Promises bookで扱う予定の内容について書く場所。

書籍の目的

  • Promisesとはどういうものかを学び、パターンやテストを扱えるようになる事。
  • Promisesの向き不向きを知り、濫用しすぎない自制心を養う事。

現在のアウトラインの状況は promises-book 2014-03-05 23-15-20 2014-03-05 23-15-22 の所から見られます。

これもあるといいのでは?とか、こういうのどうするのがいいんだろ?的なのを書いたり、
pull requestするといいと思います。

後、タイトルも仮です…

#7 で決まった

  • タイトルを決める

@azu azu mentioned this pull request Mar 6, 2014
@azu
Copy link
Owner Author

azu commented Mar 6, 2014

みたいな見た目は普通のメソッドチェーンだけど、中身はpromise chainになっててみたいのについて詳しく知りたい感じがする。

メリットとかデバッガビリティとか。

jQueryみたいチェイン、stream、promise chain とか見た目がおなじだけど中身が何か違うみたいの説明できるようにしたいな。

promiseが大きく違う感じがするのは promise.then は新しいオブジェクトを毎回返すことな気がしてる。

- コールバック関数をpromisefyしてみよう
- Promisesのエラーハンドリング
- `then` でエラーが起きたらどうなるの?
- Promisesのテストを書いてみよう
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これに、

returnPromise.then(function(value){
  assert(value);
  done();
});

みたいな意図しない結果になってしまうテストについても書いておきたい。

https://twitter.com/azu_re/status/443907054286036993

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mocha 1.18.0でPromisesがサポートされたので、基本はmocha使おうでいい感じになった。

azu/mocha-support-promise

Buster.JSも同じようにthenableのテストをサポートしてる。

Test case — Buster.JS 0.7 documentation

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MochaがPromisesのテストをサポートしました | Web scratch

一応記事書いた。

書籍では、軽く使い方紹介して参照する形な気がする。

@azu
Copy link
Owner Author

azu commented Apr 5, 2014

MDNにもcatchしわすれてるpromiseのアンチパターン書いてあった。

@azu azu mentioned this pull request May 4, 2014
@azu azu mentioned this pull request May 20, 2014
@azu
Copy link
Owner Author

azu commented Jun 7, 2014

もうアウトラインは用が済んだので閉じる

@azu azu closed this Jun 7, 2014
@azu azu deleted the outline branch June 7, 2014 14:09
@azu azu changed the title [WIP] この書籍で扱う内容について この書籍で扱う内容について Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant