ECMAScript 8 Cookbook: Over 70 recipes to help you improve your coding skills and solving practical JavaScript problems

Ross Harrison

  • 出版商: Packt Publishing
  • 出版日期: 2018-03-29
  • 定價: $1,380
  • 售價: 6.0$828
  • 語言: 英文
  • 頁數: 348
  • 裝訂: Paperback
  • ISBN: 1788628179
  • ISBN-13: 9781788628174
  • 相關分類: JavaScript
  • 立即出貨 (庫存=1)

買這商品的人也買了...

商品描述

Become a better web programmer by writing efficient and modular code by using various features of ECMAScript

Key Features

  • A recipe based guide to help you become a better web programmer and write efficient and modular code.
  • Learn to write asynchronous code and improve the speed of your web applications.
  • Discover the power of writing object-oriented Web JavaScript code using ES 8

Book Description

ECMAScript is a specification that JavaScript, TypeScript and many other implement. Learning to write beautiful, efficient and modular code across all this languages requires good understanding of the concepts, features, and APIs of ECMAScript. The recent releases of ECMAScript have transformed JavaScript by introducing new collections types, functional APIs, OOP, and other syntactic updates.

This book provides that perfect learning solution to help you become an efficient programmer across multiple disciplines. It follows a modular approach which includes independent recipes covering different feature sets and specifications of ECMAScript 2017/ES8. You will start with organizing your JavaScript applications, as well as delivering those applications to modern and legacy system. Next, you will go through features that were added to enhance asynchronous and parallel operations which includes ES8 async, SharedArrayBuffers, and Atomic operations. You will see how ES8 async functions help simplify asynchronous operations and remove boilerplate from ES6 Promise usage. Further you, will go through SharedArrayBuffers that allow WebWorkers to share data directly, and Atomic operations help coordinate behavior across the threads. Lastly, you will work with OOP and Collections, followed by new functions and methods on the built in Object and Array types that make common operations more manageable, and less error prone. This will be followed by classes and inheritance that make it easier to build more sophisticated and expressive program structures. In the end, you will also go through Sets, Maps, and Symbols which are the new types introduced that add new behaviors allowing you to create simple and powerful modules.

By the end of the book, you will be able to use the new features in ES8 that allow you to produce more efficient, expressive, and simpler programs.

What you will learn

  • Organize JavaScript programs across multiple files, using ES modules
  • Bundle a set of modules into a single script file using Webpack
  • Create and work with promises using the Promise object and methods
  • Compose async functions to propagate and handle errors
  • Implement WebWorkers, SharedMemoryBuffers and Atomic functions to perform operations in parallel
  • Go through different design patterns to create structures in order to solve common organizational and processing issues
  • Use and extend Map, Set, and Symbol to work with user defined classes and simulate data types
  • Explore the new array methods to limit the need for looping with arrays and other collections

Who This Book Is For

If you are a JavaScript developer with basic development, and now want to learn about the latest features in order to develop better client-side programs with JavaScript, then this book is for you.

商品描述(中文翻譯)

成為一個更好的網頁程式設計師,透過使用 ECMAScript 的各種功能來撰寫高效且模組化的程式碼。

主要特點:
- 以配方為基礎的指南,幫助您成為更好的網頁程式設計師,並撰寫高效且模組化的程式碼。
- 學習撰寫非同步程式碼,提升網頁應用程式的速度。
- 發現使用 ES 8 撰寫物件導向網頁 JavaScript 程式碼的威力。

書籍描述:
ECMAScript 是 JavaScript、TypeScript 和許多其他語言的規範。要在這些語言中撰寫美觀、高效且模組化的程式碼,需要對 ECMAScript 的概念、功能和 API 有良好的理解。最近的 ECMAScript 版本通過引入新的集合類型、函數式 API、物件導向編程和其他語法更新,改變了 JavaScript。

本書提供了完美的學習解決方案,幫助您成為多個領域的高效程式設計師。它採用模組化的方法,包括獨立的配方,涵蓋了 ECMAScript 2017/ES8 的不同功能集和規範。您將從組織 JavaScript 應用程式開始,並將這些應用程式交付給現代和舊有系統。接下來,您將瞭解增強非同步和並行操作的功能,包括 ES8 的非同步、SharedArrayBuffers 和原子操作。您將看到 ES8 的非同步函數如何簡化非同步操作,並從 ES6 Promise 的使用中消除樣板代碼。此外,您還將瞭解 SharedArrayBuffers,它允許 WebWorkers 直接共享數據,以及原子操作,有助於協調線程之間的行為。最後,您將使用物件導向編程和集合,以及內建的 Object 和 Array 類型上的新函數和方法,使常見操作更易於管理且更少出錯。接著是類和繼承,使構建更複雜和表達性的程式結構更容易。最後,您還將瞭解 Sets、Maps 和 Symbols,這些是引入的新類型,添加了新的行為,使您能夠創建簡單且功能強大的模組。

通過閱讀本書,您將能夠使用 ES8 的新功能,以產生更高效、表達性和簡單的程式。

您將學到:
- 使用 ES 模組在多個檔案中組織 JavaScript 程式。
- 使用 Webpack 將一組模組打包成單一腳本檔。
- 使用 Promise 物件和方法創建並處理 promises。
- 組合非同步函數以傳播和處理錯誤。
- 實現 WebWorkers、SharedMemoryBuffers 和原子函數以並行執行操作。
- 使用不同的設計模式來創建結構,以解決常見的組織和處理問題。
- 使用和擴展 Map、Set 和 Symbol 來處理使用者定義的類別並模擬資料類型。
- 探索新的陣列方法,以減少對陣列和其他集合的迴圈需求。

本書適合對 JavaScript 有基本開發經驗的開發人員,並希望學習最新功能以開發更好的客戶端程式。