Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
JavaScript: Best Practice
Notice of Rights
Notice of Liability
Trademark Notice
About SitePoint
Preface
Who Should Read This Book?
Conventions Used
Code Samples
Tips, Notes, and Warnings
Chapter 1: The Anatomy of a Modern JavaScript Application
by James Kolce
A Note About Node.js
JavaScript ES2015+
Declaring variables
Arrow functions
Improved Class syntax
Promises / Async functions
Modules
Code linting
Modular Code
CommonJS modules
ES2015 modules
Package Management
Build Tools
Module bundling
Transpilation
Build systems & task runners
Application Architecture
Single Page Applications (SPAs)
Universal / Isomorphic Applications
Deployment
Team development
Conclusion
Chapter 2: Clean Code with ES6 Default Parameters & Property Shorthands
by Moritz Kröger
ES6 Default Parameters
A real-world example
ES6 Property Shorthands
Shorten Your API
Conclusion
Chapter 3: JavaScript Performance Optimization Tips: An Overview
by Ivan Čurić
Setting the Stage
What Exactly is Performant JS Code?
Respond
Animate
Idle work
Load
Context is Everything
Parsing, Compiling and Executing
Bundle Sizes are Everything
Conclusion
Chapter 4: JavaScript Design Patterns: The Singleton
by Samier Saeed
Explaining ES6
What Is a Singleton
The Old Way of Creating a Singleton in JavaScript
The New Way(s)
Conclusion
Chapter 5:JavaScript Object Creation: Patterns and Best Practices
by Jeff Mott
Object Literals
Factory Functions
Prototype Chains
ES5 Classes
ES6 Classes
Comparison
Performance
Features
Conclusion
Chapter 6: Best Practices for Using Modern JavaScript Syntax
by M. David Green
Something Solid to Cling To
A Spoonful of Syntactic Sugar
When Your const Isn’t Consistent
Limiting the Scope of the Function
Getting to Class on Time
Pointed Differences with Arrow Functions
Understand What You’re Getting
Chapter 7: Flow Control in Modern JS: Callbacks to Promises to Async/Await
by Craig Buckler
Single-thread Processing
Going Asynchronous with Callbacks
Callback Hell
Promises
Asynchronous Chaining
Multiple Asynchronous Calls with Promise.all()
Multiple Asynchronous Calls with Promise.race()
A Promising Future?
Async/Await
Promises, Promises
Asynchronous Awaits in Synchronous Loops
try/catch Ugliness
JavaScript Journey
Chapter 8: JavaScript’s New Private Class Fields, and How to Use Them
by Craig Buckler
ES6 Class Basics
Getters and Setters
Child or Sub-Classes
Static Methods and Properties
ESnext Class Fields
Static Class Fields
Private Class Fields
Immediate Benefit: Cleaner React Code!
Using Class Fields Today
Class Fields: an Improvement?
← Prev
Back
Next →
← Prev
Back
Next →