| CARVIEW |
JavaScript: The Good Parts
Unearthing the Excellence in JavaScript
- By
- Douglas Crockford
- Publisher:
- O'Reilly Media
- Released:
- May 2008
- Pages:
- 176
Considered the JavaScript expert by many people in the development community, author Douglas Crockford identifies the abundance of good ideas that make JavaScript an outstanding object-oriented programming language-ideas such as functions, loose typing, dynamic objects, and an expressive object literal notation. Unfortunately, these good ideas are mixed in with bad and downright awful ideas, like a programming model based on global variables.
When Java applets failed, JavaScript became the language of the Web by default, making its popularity almost completely independent of its qualities as a programming language. In JavaScript: The Good Parts, Crockford finally digs through the steaming pile of good intentions and blunders to give you a detailed look at all the genuinely elegant parts of JavaScript, including:
- Syntax
- Objects
- Functions
- Inheritance
- Arrays
- Regular expressions
- Methods
- Style
- Beautiful features
The real beauty? As you move ahead with the subset of JavaScript that this book presents, you'll also sidestep the need to unlearn all the bad parts. Of course, if you want to find out more about the bad parts and how to use them badly, simply consult any other JavaScript book.
With JavaScript: The Good Parts, you'll discover a beautiful, elegant, lightweight and highly expressive language that lets you create effective code, whether you're managing object libraries or just trying to get Ajax to run fast. If you develop sites or applications for the Web, this book is an absolute must.
-
Chapter 1 Good Parts
-
Why JavaScript?
-
Analyzing JavaScript
-
A Simple Testing Ground
-
-
Chapter 2 Grammar
-
Whitespace
-
Names
-
Numbers
-
Strings
-
Statements
-
Expressions
-
Literals
-
Functions
-
-
Chapter 3 Objects
-
Object Literals
-
Retrieval
-
Update
-
Reference
-
Prototype
-
Reflection
-
Enumeration
-
Delete
-
Global Abatement
-
-
Chapter 4 Functions
-
Function Objects
-
Function Literal
-
Invocation
-
Arguments
-
Return
-
Exceptions
-
Augmenting Types
-
Recursion
-
Scope
-
Closure
-
Callbacks
-
Module
-
Cascade
-
Curry
-
Memoization
-
-
Chapter 5 Inheritance
-
Pseudoclassical
-
Object Specifiers
-
Prototypal
-
Functional
-
Parts
-
-
Chapter 6 Arrays
-
Array Literals
-
Length
-
Delete
-
Enumeration
-
Confusion
-
Methods
-
Dimensions
-
-
Chapter 7 Regular Expressions
-
An Example
-
Construction
-
Elements
-
-
Chapter 8 Methods
-
Chapter 9 Style
-
Chapter 10 Beautiful Features
-
Appendix Awful Parts
-
Global Variables
-
Scope
-
Semicolon Insertion
-
Reserved Words
-
Unicode
-
typeof
-
parseInt
-
+
-
Floating Point
-
NaN
-
Phony Arrays
-
Falsy Values
-
hasOwnProperty
-
Object
-
-
Appendix Bad Parts
-
==
-
with Statement
-
eval
-
continue Statement
-
switch Fall Through
-
Block-less Statements
-
++ −−
-
Bitwise Operators
-
The function Statement Versus the function Expression
-
Typed Wrappers
-
new
-
void
-
-
Appendix JSLint
-
Undefined Variables and Functions
-
Members
-
Options
-
Semicolon
-
Line Breaking
-
Comma
-
Required Blocks
-
Forbidden Blocks
-
Expression Statements
-
for in Statement
-
switch Statement
-
var Statement
-
with Statement
-
=
-
== and !=
-
Labels
-
Unreachable Code
-
Confusing Pluses and Minuses
-
++ and −−
-
Bitwise Operators
-
eval Is Evil
-
void
-
Regular Expressions
-
Constructors and new
-
Not Looked For
-
HTML
-
JSON
-
Report
-
-
Appendix Syntax Diagrams
-
Appendix JSON
-
JSON Syntax
-
Using JSON Securely
-
A JSON Parser
-
-
Colophon

- Title:
- JavaScript: The Good Parts
- By:
- Douglas Crockford
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- May 2008
- Ebook Release:
- December 2008
- Pages:
- 176
- Print ISBN:
- 978-0-596-51774-8
- | ISBN 10:
- 0-596-51774-2
- Ebook ISBN:
- 978-0-596-15873-6
- | ISBN 10:
- 0-596-15873-4
-
Douglas Crockford
Douglas Crockford is a Senior JavaScript Architect at Yahoo!, well known for introducing and maintaining the JSON (JavaScript Object Notation) format. He's a regular speaker at conferences on advanced JavaScript topics, and serves on the ECMAScript committee.
The animal on the cover of JavaScript: The Good Parts is a Plain Tiger butterfly (Danaus chrysippus).Outside of Asia, the insect is also known as the African Monarch. It is a medium-size butterfly characterized by bright orange wings with six black spots and alternating black-and-white stripes.
Its striking looks have been noted for millennia by scientists and artists. The writer Vladimir Nabokov--who was also a noted lepidopterist--had admiring words for the butterfly in an otherwise scathing New York Times book review of Alice Ford's Audubon's Butterflies, Moths, and Other Studies (The Studio Publications). In the book, Ford labels drawings made previous to and during Audubon's time in the 19th century as "scientifi-cally [sic] unsophisticated."
In response to Ford, Nabokov writes, "The unsophistication is all her own. She might have looked up John Abbot's prodigious representations of North American lepidoptera, 1797, or the splendid plates of 18th- and early-19th-century German lepidopterists.She might have traveled back some 33 centuries to the times of Tuthmosis IV or Amenophis III and, instead of the obvious scarab, found there frescoes with a marvelous Egyptian butterfly (subtly combining the pattern of our Painted Lady and the body of an African ally of the Monarch)."
While the Plain Tiger's beauty is part of its charm, its looks can also be deadly. During its larval stages, the butterfly ingests alkaloids that are poisonous to birds--its main predator--which are often attracted to the insect's markings. After ingesting the Plain Tiger, a bird will vomit repeatedly--occasionally fatally.If the bird lives, it will let other birds know to avoid the insect, which can also be recognized by its leisurely, meandering pattern of flying low to the earth.
The cover image is from Dover's Animals. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed.
|
©2009, O'Reilly Media, Inc. (707) 827-7000 / (800) 998-9938 All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. |
About O'Reilly
Academic Solutions Authors Contacts Customer Service Jobs Newsletters O'Reilly Labs Press Room Privacy Policy RSS Feeds Terms of Service User Groups Writing for O'Reilly |
Content Archive Business Technology Computer Technology Microsoft Mobile Network Operating System Digital Photography Programming Software Web Web Design |
More O'Reilly Sites
O'Reilly Radar Ignite Tools of Change for Publishing Digital Media Inside iPhone makezine.com craftzine.com hackszine.com perl.com xml.com Partner Sites InsideRIA java.net O'Reilly Insights on Forbes.com |





