ASYNC JavaScript: Build More Responsive Apps with Less Code(Paperback) (非同步 JavaScript:用更少的程式碼打造更具回應性的應用程式)

Trevor Burnham

  • 出版商: O'Reilly
  • 出版日期: 2013-01-01
  • 售價: $930
  • 貴賓價: 9.5$884
  • 語言: 英文
  • 頁數: 106
  • 裝訂: Paperback
  • ISBN: 1937785270
  • ISBN-13: 9781937785277
  • 相關分類: JavaScript
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

With the advent of HTML5, front-end MVC, and Node.js, JavaScript is ubiquitous--and still messy. This book will give you a solid foundation for managing async tasks without losing your sanity in a tangle of callbacks. It's a fast-paced guide to the most essential techniques for dealing with async behavior, including PubSub, evented models, and Promises. With these tricks up your sleeve, you'll be better prepared to manage the complexity of large web apps and deliver responsive code.

With Async JavaScript, you'll develop a deeper understanding of the JavaScript language. You'll start with a ground-up primer on the JavaScript event model--key to avoiding many of the most common mistakes JavaScripters make. From there you'll see tools and design patterns for turning that conceptual understanding into practical code.

The concepts in the book are illustrated with runnable examples drawn from both the browser and the Node.js server framework, incorporating complementary libraries including jQuery, Backbone.js, and Async.js. You'll learn how to create dynamic web pages and highly concurrent servers by mastering the art of distributing events to where they need to be handled, rather than nesting callbacks within callbacks within callbacks.

Async JavaScript will get you up and running with real web development quickly. By the time you've finished the Promises chapter, you'll be parallelizing Ajax requests or running animations in sequence. By the end of the book, you'll even know how to leverage Web Workers and AMD for JavaScript applications with cutting-edge performance. Most importantly, you'll have the knowledge you need to write async code with confidence.

What You Need:

Basic knowledge of JavaScript is recommended. If you feel that you're not up to speed, see the "Resources for Learning JavaScript" section in the preface.

商品描述(中文翻譯)

隨著 HTML5、前端 MVC 和 Node.js 的興起,JavaScript 無處不在——但仍然雜亂無章。本書將為您提供管理非同步任務的堅實基礎,讓您在回呼函數的糾結中不至於失去理智。這是一本快速入門的指南,涵蓋處理非同步行為的最基本技術,包括 PubSub、事件模型和 Promises。掌握這些技巧後,您將能更好地管理大型網頁應用的複雜性,並提供響應式的程式碼。

透過《Async JavaScript》,您將對 JavaScript 語言有更深入的理解。您將從 JavaScript 事件模型的基礎開始,這對於避免許多 JavaScripters 常犯的錯誤至關重要。接下來,您將看到將這種概念理解轉化為實際程式碼的工具和設計模式。

本書中的概念以可執行的範例進行說明,這些範例來自瀏覽器和 Node.js 伺服器框架,並結合了 jQuery、Backbone.js 和 Async.js 等輔助庫。您將學會如何創建動態網頁和高併發伺服器,掌握將事件分發到需要處理的地方的藝術,而不是將回呼函數嵌套在回呼函數中。

《Async JavaScript》將讓您迅速上手真正的網頁開發。當您完成 Promises 章節時,您將能夠平行化 Ajax 請求或按順序運行動畫。到書的結尾,您甚至會知道如何利用 Web Workers 和 AMD 來為 JavaScript 應用程式提供尖端性能。最重要的是,您將擁有自信編寫非同步程式碼所需的知識。

您需要的知識:
建議具備基本的 JavaScript 知識。如果您覺得自己還不夠熟悉,請參閱前言中的「學習 JavaScript 的資源」部分。