Limit search to available items
Book Cover
E-book
Author Spencer, Lawrence D., author

Title Reliable JavaScript / Lawrence D. Spencer, Seth H. Richards
Published Indianapolis, Indiana : Wrox, [2015]
©2015

Copies

Description 1 online resource
Series Wrox professional guides
Wrox professional guides.
Contents Reliable JavaScript®; Contents; Introduction; Part I: Laying a Solid Foundation; Chapter 1: Practicing Skillful Software; Writing Code That Starts Correct; Mastering the Features of JavaScript; Case Study: D3.js; JavaScript Is Single-Threaded; Avoiding JavaScript's Pitfalls in Larger Systems; Scripts Are Not Modules; Nested Functions Control Scope; Coding by Contract; Applying the Principles of Software Engineering; The SOLID Principles; The DRY Principle; Writing Code That Stays Correct; Investing for the Future with Unit Tests; Practicing Test-Driven Development
Engineering Your Code to Be Easy to TestSummary; Chapter 2: Tooling Up ; Using a Testing Framework; Identifying Incorrect Code; Designing for Testability; Writing the Minimum Required Code; Safe Maintenance and Refactoring; Runnable Specification; Current Open-Source and Commercial Frameworks; QUnit; D.O.H.; Introducing Jasmine; Suites and Specs; Expectations and Matchers; Spies; Using a Dependency-Injection Framework; What Is Dependency Injection?; Making Your Code More Reliable with Dependency Injection; Mastering Dependency Injection
Case Study: Writing a Lightweight Dependency-Injection FrameworkUsing a Dependency-Injection Framework; Current Dependency-Injection Frameworks; RequireJS; AngularJS; Using an Aspect Toolkit; Case Study: Caching with and without AOP; Implementing Caching without AOP; Making Your Code More Reliable with AOP; Case Study: Building the Aop.js Module; Other AOP Libraries; AspectJS; AopJS jQuery Plugin; YUI's Do Class; Conclusion; Using a Code-Checking Tool; Making Your Code More Reliable with Linting Tools; Introducing JSHint; Using JSHint; If You Don't Run It, Bugs Will Come
Alternatives to JSHintJSLint; ESLint; Strict Mode; Summary; Chapter 3: Constructing Reliable Objects; Using Primitives; Using Object Literals; Using the Module Pattern; Creating Modules-at-Will; Creating Immediate-Execution Modules; Creating Reliable Modules; Using Object Prototypes and Prototypal Inheritance; The Default Object Prototype; Prototypal Inheritance; Prototype Chains; Creating Objects with New; The new Object Creation Pattern; Potential for Bad Things to Happen; Enforcing the Use of new; Using Classical Inheritance; Emulating Classical Inheritance; Repetition Killed the Kangaroo
Using Functional InheritanceMonkey-Patching; Summary; Part II: Testing Pattern-Based Code; Chapter 4: Reviewing the Benefits of Patterns; Case Study; Producing More Elegant Code by Using a Broader Vocabulary; Producing Reliable Code with Well-Engineered, Well-Tested Building Blocks; Summary; Chapter 5: Ensuring Correct Use of the Call back Pattern; Understanding the Pattern Through Unit Tests; Writing and Testing Code That Uses Callback Functions; Writing and Testing Callback Functions; Avoiding Problems; Flattening the Callback Arrow; Minding this; Summary
Summary Create more robust applications with a test-first approach to JavaScript Reliable JavaScript, How to Code Safely in the World's Most Dangerous Language demonstrates how to create test-driven development for large-scale JavaScript applications that will stand the test of time and stay accurate through long-term use and maintenance. Taking a test-first approach to software architecture, this book walks you through several patterns and practices and explains what they are supposed to do by having you write unit tests. Write the code to pass the unit tests, so you not only develop your technique
Notes Includes index
Online resource; title from PDF title page (Wiley Online Library, viewed August 27, 2015)
Subject JavaScript (Computer program language)
Computer programming.
computer programming.
Computer programming
JavaScript (Computer program language)
Form Electronic book
Author Richards, Seth H., author
ISBN 9781119209553
1119209552
9781119028734
1119028736
9781119028741
1119028744