NMC Library
Image from Google Jackets

JavaScript patterns / Stoyan Stefanov.

By: Publication details: Sebastopol, CA : O'Reilly, c2010.Description: xvi, 216 p. : ill. ; 24 cmISBN:
  • 9780596806750 (pbk.)
  • 0596806752 (pbk.)
Subject(s): LOC classification:
  • QA76.73 .J39 S74 2010
Contents:
Preface -- 1. Introduction -- Patterns -- JavaScript: concepts -- ECMAScript 5 -- JSLint -- The Console -- 2. Essentials -- Writing maintainable code -- Minimizing globals -- For loops -- For-in loops -- (Not) augmenting built-in prototypes -- Switch pattern -- Avoiding implied typecasting -- Number conversions with parseInt() -- Coding conventions -- Naming conventions -- Writing comments -- Writing API docs -- Writing to be read -- Peer reviews -- Minify...in production -- Run JSLint -- Summary -- 3. Literals and constructors -- Object literal -- Custom constructor functions -- Patterns for enforcing new -- Array literal -- JSON -- Regular expression literal -- Primitive wrappers -- Error objects -- Summary -- 4. Functions -- Background -- Callback pattern -- Returning functions -- Self-defining functions -- Immediate functions -- Immediate object initialization -- Init-time branching -- Function properties -- a memorization pattern -- Configuration objects -- Curry -- Summary 5. Object creation patterns -- Namespace pattern -- Declaring dependencies -- Private properties and methods -- Module pattern -- Sandbox pattern -- Static members -- Object constants -- Chaining pattern -- Method() method -- Summary -- 6. Code reuse patterns -- Classical versus modern inheritance patterns -- Expected outcome when using classical inheritance -- Classical pattern #1 -- the default pattern -- Classical pattern #2 -- rent-a-constructor -- Classical pattern #3 -- rent and set prototype -- Classical pattern #4 -- share the prototype -- Classical pattern #5 -- a temporary constructor -- Klass -- Prototypal inheritance -- Inheritance by copying properties -- Mix-ins -- Borrowing methods -- Summary -- 7. Design patterns -- Singleton -- Factory -- Iterator -- Decorator -- Strategy -- Facade -- Proxy -- Mediator -- Observer -- Summary -- 8. DOM and browser patterns -- Separation of concerns -- DOM scripting -- Events -- Long-running scripts -- Remote scripting -- Deploying JavaScript -- Loading strategies -- Summary -- Index.
Holdings
Item type Current library Shelving location Call number Copy number Status Date due Barcode
Book Book NMC Library Stacks QA76.73 .J39 S74 2010 (Browse shelf(Opens below)) 1 Available 33039001216836

Includes index.

Preface -- 1. Introduction -- Patterns -- JavaScript: concepts -- ECMAScript 5 -- JSLint -- The Console -- 2. Essentials -- Writing maintainable code -- Minimizing globals -- For loops -- For-in loops -- (Not) augmenting built-in prototypes -- Switch pattern -- Avoiding implied typecasting -- Number conversions with parseInt() -- Coding conventions -- Naming conventions -- Writing comments -- Writing API docs -- Writing to be read -- Peer reviews -- Minify...in production -- Run JSLint -- Summary -- 3. Literals and constructors -- Object literal -- Custom constructor functions -- Patterns for enforcing new -- Array literal -- JSON -- Regular expression literal -- Primitive wrappers -- Error objects -- Summary -- 4. Functions -- Background -- Callback pattern -- Returning functions -- Self-defining functions -- Immediate functions -- Immediate object initialization -- Init-time branching -- Function properties -- a memorization pattern -- Configuration objects -- Curry -- Summary 5. Object creation patterns -- Namespace pattern -- Declaring dependencies -- Private properties and methods -- Module pattern -- Sandbox pattern -- Static members -- Object constants -- Chaining pattern -- Method() method -- Summary -- 6. Code reuse patterns -- Classical versus modern inheritance patterns -- Expected outcome when using classical inheritance -- Classical pattern #1 -- the default pattern -- Classical pattern #2 -- rent-a-constructor -- Classical pattern #3 -- rent and set prototype -- Classical pattern #4 -- share the prototype -- Classical pattern #5 -- a temporary constructor -- Klass -- Prototypal inheritance -- Inheritance by copying properties -- Mix-ins -- Borrowing methods -- Summary -- 7. Design patterns -- Singleton -- Factory -- Iterator -- Decorator -- Strategy -- Facade -- Proxy -- Mediator -- Observer -- Summary -- 8. DOM and browser patterns -- Separation of concerns -- DOM scripting -- Events -- Long-running scripts -- Remote scripting -- Deploying JavaScript -- Loading strategies -- Summary -- Index.

Powered by Koha