售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
JavaScript Unlocked
Table of Contents
JavaScript Unlocked
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Diving into the JavaScript Core
Make your code readable and expressive
Function argument default value
Conditional invocation
Arrow functions
Method definitions
The rest operator
The spread operator
Mastering multiline strings in JavaScript
Concatenation versus array join
Template literal
Multi-line strings via transpilers
Manipulating arrays in the ES5 way
Array methods in ES5
Array methods in ES6
Traversing an object in an elegant, reliable, safe, and fast way
Iterating the key-value object safely and fast
Enumerating an array-like object
The collections of ES6
The most effective way of declaring objects
Classical approach
Approach with the private state
Inheritance with the prototype chain
Inheriting from prototype with Object.create
Inheriting from prototype with Object.assign
Approach with ExtendClass
Classes in ES6
How to – magic methods in JavaScript
Accessors in ES6 classes
Controlling access to arbitrary properties
Summary
2. Modular Programming with JavaScript
How to get out of a mess using modular JavaScript
Modules
Cleaner global scope
Packaging code into files
Reuse
Module patterns
Augmentation
Module standards
How to use asynchronous modules in the browser
Pros and cons
How to – use synchronous modules on the server
Pros and cons
UMD
JavaScript's built-in module system
Named exports
Default export
The module loader API
Conclusion
Transpiling CommonJS for in-browser use
Bundling ES6 modules for synchronous loading
Summary
3. DOM Scripting and AJAX
High-speed DOM operations
Traversing the DOM
Changing the DOM
Styling the DOM
Making use of attributes and properties
Handling DOM events
Communicating with the server
XHR
Fetch API
Summary
4. HTML5 APIs
Storing data in web-browser
Web Storage API
IndexedDB
FileSystem API
Boosting performance with JavaScript workers
Creating the first web component
Learning to use server-to-browser communication channels
Server-Sent Events
Web Sockets
Summary
5. Asynchronous JavaScript
Nonblocking JavaScript
Error-first Callback
Continuation-passing style
Handling asynchronous functions in the ES7 way
Parallel tasks and task series with the Async.js library
Event handling optimization
Debouncing
Throttling
Writing callbacks that don't impact latency-critical events
Summary
6. A Large-Scale JavaScript Application Architecture
Design patterns in JavaScript
Understanding concern separation in JavaScript
MVVM
Using JavaScript MV* frameworks
Backbone
Angular
React
Summary
7. JavaScript Beyond the Browser
Levelling up the coding of a command-line program in JavaScript
Building a web server with JavaScript
Writing a desktop HTML5 application
Setting up the project
Adding the HTML5 application
Debugging
Packaging
Using PhoneGap to make a mobile native app
Setting up the project
Building the project
Adding plugins
Debugging
Summary
8. Debugging and Profiling
Hunting bugs
Getting the best from a console API
Tuning performance
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜