reklama - zainteresowany?

JavaScript Patterns - Helion

JavaScript Patterns
ebook
Autor: Stoyan Stefanov
ISBN: 978-14-493-9694-7
stron: 236, Format: ebook
Data wydania: 2010-09-09
Księgarnia: Helion

Cena książki: 84,92 zł (poprzednio: 98,74 zł)
Oszczędzasz: 14% (-13,82 zł)

Dodaj do koszyka JavaScript Patterns

Tagi: JavaScript - Programowanie

What's the best approach for developing an application with JavaScript? This book helps you answer that question with numerous JavaScript coding patterns and best practices. If you're an experienced developer looking to solve problems related to objects, functions, inheritance, and other language-specific categories, the abstractions and code templates in this guide are ideal—whether you're using JavaScript to write a client-side, server-side, or desktop application.

Written by JavaScript expert Stoyan Stefanov—Senior Yahoo! Technical and architect of YSlow 2.0, the web page performance optimization tool—JavaScript Patterns includes practical advice for implementing each pattern discussed, along with several hands-on examples. You'll also learn about anti-patterns: common programming approaches that cause more problems than they solve.

  • Explore useful habits for writing high-quality JavaScript code, such as avoiding globals, using single var declarations, and more
  • Learn why literal notation patterns are simpler alternatives to constructor functions
  • Discover different ways to define a function in JavaScript
  • Create objects that go beyond the basic patterns of using object literals and constructor functions
  • Learn the options available for code reuse and inheritance in JavaScript
  • Study sample JavaScript approaches to common design patterns such as Singleton, Factory, Decorator, and more
  • Examine patterns that apply specifically to the client-side browser environment

Dodaj do koszyka JavaScript Patterns

 

Osoby które kupowały "JavaScript Patterns", wybierały także:

  • Matematyka dla programistów JavaScript
  • Vue.js 2. Wprowadzenie dla profesjonalistów
  • D3.js w akcji
  • Baw siÄ™ kodem! Twoja wÅ‚asna gra. CoderDojo Nano
  • Tablice informatyczne. Node.js

Dodaj do koszyka JavaScript Patterns

Spis treści

JavaScript Patterns. Build Better Applications with Coding and Design Patterns eBook -- spis treści

  • JavaScript Patterns
  • Dedication
  • SPECIAL OFFER: Upgrade this ebook with OReilly
  • Preface
    • Target Audience
    • Conventions Used in This Book
    • Using Code Examples
    • Safari Books Online
    • How to Contact Us
    • Acknowledgments
    • Credits
    • Reading
  • 1. Introduction
    • Patterns
    • JavaScript: Concepts
      • Object-Oriented
      • No Classes
      • Prototypes
      • Environment
    • ECMAScript 5
    • JSLint
    • The Console
  • 2. Essentials
    • Writing Maintainable Code
    • Minimizing Globals
      • The Problem with Globals
      • Side Effects When Forgetting var
      • Access to the Global Object
      • Single var Pattern
      • Hoisting: A Problem with Scattered vars
    • for Loops
    • for-in Loops
    • (Not) Augmenting Built-in Prototypes
    • switch Pattern
    • Avoiding Implied Typecasting
    • Avoiding eval()
    • Number Conversions with parseInt()
    • Coding Conventions
      • Indentation
      • Curly Braces
      • Opening Brace Location
      • White Space
    • Naming Conventions
      • Capitalizing Constructors
      • Separating Words
      • Other Naming Patterns
    • Writing Comments
    • Writing API Docs
      • YUIDoc Example
    • Writing to Be Read
    • Peer Reviews
    • MinifyIn Production
    • Run JSLint
    • Summary
  • 3. Literals and Constructors
    • Object Literal
      • The Object Literal Syntax
      • Objects from a Constructor
      • Object Constructor Catch
    • Custom Constructor Functions
      • Constructors Return Values
    • Patterns for Enforcing new
      • Naming Convention
      • Using that
      • Self-Invoking Constructor
    • Array Literal
      • Array Literal Syntax
      • Array Constructor Curiousness
      • Check for Array-ness
    • JSON
      • Working with JSON
    • Regular Expression Literal
      • Regular Expression Literal Syntax
    • Primitive Wrappers
    • Error Objects
    • Summary
  • 4. Functions
    • Background
      • Disambiguation of Terminology
      • Declarations Versus Expressions: Names and Hoisting
      • Functions name Property
      • Function Hoisting
    • Callback Pattern
      • A Callback Example
      • Callbacks and Scope
      • Asynchronous Event Listeners
      • Timeouts
      • Callbacks in Libraries
    • Returning Functions
    • Self-Defining Functions
    • Immediate Functions
      • Parameters of an Immediate Function
      • Returned Values from Immediate Functions
      • Benefits and Usage
    • Immediate Object Initialization
    • Init-Time Branching
    • Function PropertiesA Memoization Pattern
    • Configuration Objects
    • Curry
      • Function Application
      • Partial Application
      • Currying
      • When to Use Currying
    • Summary
  • 5. Object Creation Patterns
    • Namespace Pattern
      • General Purpose Namespace Function
    • Declaring Dependencies
    • Private Properties and Methods
      • Private Members
      • Privileged Methods
      • Privacy Failures
      • Object Literals and Privacy
      • Prototypes and Privacy
      • Revealing Private Functions As Public Methods
    • Module Pattern
      • Revealing Module Pattern
      • Modules That Create Constructors
      • Importing Globals into a Module
    • Sandbox Pattern
      • A Global Constructor
      • Adding Modules
      • Implementing the Constructor
    • Static Members
      • Public Static Members
      • Private Static Members
    • Object Constants
    • Chaining Pattern
      • Pros and Cons of the Chaining Pattern
    • method() Method
    • Summary
  • 6. Code Reuse Patterns
    • Classical Versus Modern Inheritance Patterns
    • Expected Outcome When Using Classical Inheritance
    • Classical Pattern #1The Default Pattern
      • Following the Prototype Chain
      • Drawbacks When Using Pattern #1
    • Classical Pattern #2Rent-a-Constructor
      • The Prototype Chain
      • Multiple Inheritance by Borrowing Constructors
      • Pros and Cons of the Borrowing Constructor Pattern
    • Classical Pattern #3Rent and Set Prototype
    • Classical Pattern #4Share the Prototype
    • Classical Pattern #5A Temporary Constructor
      • Storing the Superclass
      • Resetting the Constructor Pointer
    • Klass
    • Prototypal Inheritance
      • Discussion
      • Addition to ECMAScript 5
    • Inheritance by Copying Properties
    • Mix-ins
    • Borrowing Methods
      • Example: Borrow from Array
      • Borrow and Bind
      • Function.prototype.bind()
    • Summary
  • 7. Design Patterns
    • Singleton
      • Using new
      • Instance in a Static Property
      • Instance in a Closure
    • Factory
      • Built-in Object Factory
    • Iterator
    • Decorator
      • Usage
      • Implementation
      • Implementation Using a List
    • Strategy
      • Data Validation Example
    • Façade
    • Proxy
      • An Example
        • A video expando
        • Without a proxy
        • HTML
        • Event handlers
        • videos object
        • http object
        • Enter the proxy
      • Proxy As a Cache
    • Mediator
      • Mediator Example
    • Observer
      • Example #1: Magazine Subscriptions
      • Example #2: The Keypress Game
    • Summary
  • 8. DOM and Browser Patterns
    • Separation of Concerns
    • DOM Scripting
      • DOM Access
      • DOM Manipulation
    • Events
      • Event Handling
      • Event Delegation
    • Long-Running Scripts
      • setTimeout()
      • Web Workers
    • Remote Scripting
      • XMLHttpRequest
      • JSONP
        • JSONP example: Tic-tac-toe
      • Frames and Image Beacons
    • Deploying JavaScript
      • Combining Scripts
      • Minifying and Compressing
      • Expires Header
      • Using a CDN
    • Loading Strategies
      • The Place of the <script> Element
      • HTTP Chunking
      • Dynamic <script> Element for Nonblocking Downloads
        • Appending the <script> element
      • Lazy-Loading
      • Loading on Demand
      • Preloading JavaScript
    • Summary
  • Index
  • About the Author
  • Colophon
  • SPECIAL OFFER: Upgrade this ebook with OReilly
  • Copyright

Dodaj do koszyka JavaScript Patterns

Code, Publish & WebDesing by CATALIST.com.pl



(c) 2005-2024 CATALIST agencja interaktywna, znaki firmowe należą do wydawnictwa Helion S.A.