
JavaScript: Best Practice
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
There's no doubt that the JavaScript ecosystem changes fast. Not only are new tools and frameworks introduced and developed at a rapid rate, the language itself has undergone big changes with the introduction of ES2015 (aka ES6). Understandably, many articles have been written complaining about how difficult it is to learn modern JavaScript development these days. We're aiming to minimize that confusion with this set of books on modern JavaScript.
This book presents modern JavaScript best practice, utilizing the features now available in the language that enable you to write more powerful code that is clean, performant, maintainable, and resusable. It contains:
- The Anatomy of a Modern JavaScript Application by James Kolce
- Clean Code with ES6 Default Parameters & Property Shorthands by Moritz Kruger
- JavaScript Performance Optimization Tips: An Overview by Ivan CuriC
- JavaScript Design Patterns: The Singleton by Samier Saeed
- JavaScript Object Creation: Patterns and Best Practices by Jeff Mott
- Best Practices for Using Modern JavaScript Syntax by M. David Green
- Flow Control in Modern JS: Callbacks to Promises to Async/Await by Craig Buckler
- JavaScript's New Private Class Fields, and How to Use Them by Craig Buckler
This book is for all front-end developers who wish to improve their JavaScript skills. You'll need to be familiar with HTML and CSS and have a reasonable level of understanding of JavaScript in order to follow the discussion.
More details
Persons
James Kolce is a self-taught 21-year-old designer and web developer based in Mexico. Lead developer of Concise CSS, a minimalist and extensible framework to build websites quickly with good design. He writes a blog called The Brain of James Kolce, were he puts some of the knowledge he has acquired over the years.
Content
- JavaScript: Best Practice
- Clean, Maintainable, Performant Code
- JavaScript: Best Practice
- Notice of Rights
- Notice of Liability
- Trademark Notice
- About SitePoint
- Table of Contents
- Preface
- Who Should Read This Book?
- Conventions Used
- Code Samples
- Tips, Notes, and Warnings
- Hey, You!
- Ahem, Excuse Me ...
- Make Sure You Always ...
- Watch Out!
- Live Code
- Github
- The Anatomy of a Modern JavaScript Application
- 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
- Native Browser Support
- Package Management
- Build Tools
- Module bundling
- Further Reading on Module Bundling
- Transpilation
- Build systems & task runners
- Further Reading on Gulp.js
- Application Architecture
- Single Page Applications (SPAs)
- Universal / Isomorphic Applications
- Deployment
- Files That Don't Need Processing
- Team development
- Conclusion
- Clean Code with ES6 Default Parameters & Property Shorthands
- Moritz Kröger
- ES6 Default Parameters
- A real-world example
- ES6 Property Shorthands
- Shorten Your API
- Conclusion
- JavaScript Performance Optimization Tips: An Overview
- Ivan Curic
- 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
- JavaScript Design Patterns: The Singleton
- Samier Saeed
- Explaining ES6
- What Is a Singleton
- Are Singletons Bad?
- The Old Way of Creating a Singleton in JavaScript
- The New Way(s)
- Conclusion
- JavaScript Object Creation: Patterns and Best Practices
- Jeff Mott
- Object Literals
- Factory Functions
- Prototype Chains
- ES5 Classes
- ES6 Classes
- Comparison
- Performance
- Features
- Conclusion
- Best Practices for Using Modern JavaScript Syntax
- 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
- Flow Control in Modern JS: Callbacks to Promises to Async/Await
- Craig Buckler
- Single-thread Processing
- Other Languages
- 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
- JavaScript's New Private Class Fields, and How to Use Them
- 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?
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.