没有合适的资源?快使用搜索试试~ 我知道了~
You Don’t Know JS Async & Performance
5星 · 超过95%的资源 需积分: 10 8 下载量 201 浏览量
2017-05-20
21:35:31
上传
评论
收藏 3.56MB PDF 举报
温馨提示
试读
295页
Title: You Don't Know JS: Async & Performance Author: Kyle Simpson Language: English Published by: O’Reilly Media Publication Month: Mar 2015 Format: true PDF
资源推荐
资源详情
资源评论
ASYNC
& I
PERFORMANCE
KYLE SIMPSON
“Kyle wrangles the asynchronous nature of JavaScript and
shows you how to straighten it out with promises and generators.”
—MARC GRABANSKI, CEO & UI Developer, Frontend Masters
YOU DON’T KNOW JAVASCRIPT
KYLE SIMPSON
ASYNC & PERFORMANCE
JAVASCRIPT
Twitter: @oreillymedia
facebook.com/oreilly
No matter how much experience you have with JavaScript, odds are you don’t fully understand
the language. As part of the
You Don’t Know JS
series, this concise yet in-depth guide focuses
on new asynchronous features and performance techniques—including Promises, generators,
and Web Workers—that let you create sophisticated single-page web applications
and
escape
callback hell in the process.
Like other books in this series,
You Don’t Know JS: Async & Performance
dives into trickier parts of
the language that many JavaScript programmers simply avoid. Armed with this knowledge, you can
become a true JavaScript master.
WITH THIS BOOK YOU WILL:
■
Explore old and new JavaScript methods for handling asynchronous programming
■
Escape from “callback hell,” using JavaScript Promises to fix “inversion of control.”
■
Use generators to express async flow in a sequential, synchronous-looking fashion
■
Tackle program-level performance with Web Workers, SIMD, and asm.js
■
Learn valuable resources and techniques for benchmarking and tuning your
expressions and statements
KYLE SIMPSON is an Open Web evangelist who’s passionate about all things JavaScript. He’s an author,
workshop trainer, tech speaker, and OSS contributor/leader.
ASYNC
&
I
PERFORMANCE
The
YOU DON’T KNOW JS
series includes:
■
Up & Going
■
Scope & Closures
■
this & Object Prototypes
■
Types & Grammar
■
Async & Performance
■
ES6 & Beyond
oreilly.com
YouDontKnowJS.com
ISBN: 978-1-491-90422-0
US $24.99 CAN $28.99
JAVASCRIPT
ASYNC
& I
PERFORMANCE
KYLE SIMPSON
“Kyle wrangles the asynchronous nature of JavaScript and
shows you how to straighten it out with promises and generators.”
—MARC GRABANSKI, CEO & UI Developer, Frontend Masters
YOU DON’T KNOW JAVASCRIPT
KYLE SIMPSON
ASYNC & PERFORMANCE
JAVASCRIPT
Twitter: @oreillymedia
facebook.com/oreilly
No matter how much experience you have with JavaScript, odds are you don’t fully understand
the language. As part of the
You Don’t Know JS
series, this concise yet in-depth guide focuses
on new asynchronous features and performance techniques—including Promises, generators,
and Web Workers—that let you create sophisticated single-page web applications
and
escape
callback hell in the process.
Like other books in this series,
You Don’t Know JS: Async & Performance
dives into trickier parts of
the language that many JavaScript programmers simply avoid. Armed with this knowledge, you can
become a true JavaScript master.
WITH THIS BOOK YOU WILL:
■
Explore old and new JavaScript methods for handling asynchronous programming
■
Escape from “callback hell,” using JavaScript Promises to fix “inversion of control.”
■
Use generators to express async flow in a sequential, synchronous-looking fashion
■
Tackle program-level performance with Web Workers, SIMD, and asm.js
■
Learn valuable resources and techniques for benchmarking and tuning your
expressions and statements
KYLE SIMPSON is an Open Web Evangelist who’s passionate about all things JavaScript. He’s an author,
workshop trainer, tech speaker, and OSS contributor/leader.
ASYNC
&
I
PERFORMANCE
The
YOU DON’T KNOW JS
series includes:
■
Up & Going
■
Scope & Closures
■
this & Object Prototypes
■
Types & Grammar
■
Async & Performance
■
ES6 & Beyond
oreilly.com
YouDontKnowJS.com
ISBN: 978-1-491-90422-0
US $24.99 CAN $28.99
JAVASCRIPT
Kyle Simpson
Async & Performance
978-1-491-90422-0
[LSI]
Async & Performance
by Kyle Simpson
Copyright © 2015 Getify Solutions, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol,
CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional
use. Online editions are also available for most titles (http://safaribooksonline.com).
For more information, contact our corporate/institutional sales department:
800-998-9938 or corporate@oreilly.com.
Editors: Simon St. Laurent and
Brian MacDonald
Production Editor: Kristen Brown
Copyeditor: Jasmine Kwityn
Proofreader: Phil Dangler
Interior Designer: David Futato
Cover Designer: Ellie Volckhausen
March 2015:
First Edition
Revision History for the First Edition
2015-02-19: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781491904220 for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. You Don’t Know
JS: Async & Performance, the cover image, and related trade dress are trademarks of
O’Reilly Media, Inc.
While the publisher and the author have used good faith efforts to ensure that the
information and instructions contained in this work are accurate, the publisher and
the author disclaim all responsibility for errors or omissions, including without limi‐
tation responsibility for damages resulting from the use of or reliance on this work.
Use of the information and instructions contained in this work is at your own risk.
If any code samples or other technology this work contains or describes is subject to
open source licenses or the intellectual property rights of others, it is your responsi‐
bility to ensure that your use thereof complies with such licenses and/or rights.
Table of Contents
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1.
Asynchrony: Now & Later. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
A Program in Chunks 2
Event Loop 5
Parallel Threading 8
Concurrency 13
Jobs 23
Statement Ordering 24
Review 27
2.
Callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Continuations 30
Sequential Brain 31
Trust Issues 39
Trying to Save Callbacks 44
Review 48
3.
Promises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
What Is a Promise? 52
Thenable Duck Typing 64
Promise Trust 67
Chain Flow 76
Error Handling 87
Promise Patterns 94
iii
剩余294页未读,继续阅读
资源评论
- ZhouZhiqiangFreesky2021-03-26这本不错,是印刷版
zxkid
- 粉丝: 324
- 资源: 227
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功