JavaScript: The Good Parts: The Good Parts and over one million other books are available for Amazon Kindle. Learn more

Buy New

or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Buy Used
Used - Good See details
$15.16 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Kindle Edition
 
   
Sell Back Your Copy
For a $8.70 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
JavaScript: The Good Parts
 
 
Start reading JavaScript: The Good Parts: The Good Parts on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

JavaScript: The Good Parts [Paperback]

Douglas Crockford (Author)
4.1 out of 5 stars  See all reviews (112 customer reviews)

List Price: $29.99
Price: $17.83 & eligible for FREE Super Saver Shipping on orders over $25. Details
You Save: $12.16 (41%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $9.60  
Paperback $17.83  
Like this book? Find similar titles in the O'Reilly Bookstore.

Book Description

0596517742 978-0596517748 May 2008 1

Most programming languages contain good and bad parts, but JavaScript has more than its share of the bad, having been developed and released in a hurry before it could be refined. This authoritative book scrapes away these bad features to reveal a subset of JavaScript that's more reliable, readable, and maintainable than the language as a whole-a subset you can use to create truly extensible and efficient code.

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.


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

JavaScript: The Good Parts + JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) + JavaScript Patterns
Price For All Three: $69.11

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) $31.49

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • JavaScript Patterns $19.79

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details



Editorial Reviews

About the Author

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.


Product Details

  • Paperback: 176 pages
  • Publisher: Yahoo Press; 1 edition (May 2008)
  • Language: English
  • ISBN-10: 0596517742
  • ISBN-13: 978-0596517748
  • Product Dimensions: 9.3 x 7 x 0.4 inches
  • Shipping Weight: 10.4 ounces (View shipping rates and policies)
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (112 customer reviews)
  • Amazon Best Sellers Rank: #3,706 in Books (See Top 100 in Books)

More About the Author

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.

 

Customer Reviews

112 Reviews
5 star:
 (63)
4 star:
 (19)
3 star:
 (13)
2 star:
 (9)
1 star:
 (8)
 
 
 
 
 
Average Customer Review
4.1 out of 5 stars (112 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

311 of 317 people found the following review helpful:
5.0 out of 5 stars Wish I had this book when I first started Javascript, June 27, 2008
By 
Frodo Baggins (Wisconsin, United States) - See all my reviews
Amazon Verified Purchase(What's this?)
This review is from: JavaScript: The Good Parts (Paperback)
Do you struggle when creating objects in Javascript?
Do you find the syntax to be non-intuitive and frustrating?
Do you know the difference between using a function as an object vs using an object literal?
Do you know how using object literals can simplify your code and create something similar to namespaces?
Do you know how to augment the type system -- for example, if wanted all strings to have a trim() method?
Do you know why the "new" statement is so dangerous? Do you know an alternative that eliminates the use of "new" entirely?

These are some of the topics that the book touches upon.

This book is aimed at someone with intermediate programming experience that wants to know the best way to create and use objects, arrays, types, etc. Crockford takes his experience with Javascript to show you best practices coding techniques and styles to use with Javascript. In addition, the book provides insights into what makes Javascript so confusing and what can be done about it.

You might ask "Isn't this stuff already covered in other books that I have?" The answer is no. For one, most other books use a psuedo-classical coding style (see below) to explain objects that is a source of confusion.

Javascript can be very confusing, especially for programmers who have extensive experience in other C-based languages (like myself). Writing good Javascript that uses objects, methods, etc. is hard. In Javascript, if you want to create objects, use inheritance and create methods, you have several different ways to write your code and it's difficult to know what the strengths and weaknesses of each are.

Crockford explains the problem plainly. Other C-based languages use class inheritance (Crockford calls this classical inheritance). Javascript, on the other hand, is the only popular language that uses prototype inheritance, which does not have classes. However, the syntax which Javascript uses to create object is Java-like (Crockford calls this pseudo-classical syntax). It's confusing, because it keeps you in a class-based frame of mind while working in a language that has no concept of classes.

Clarifying what's going on with the object model is the best part of this book. Crockford also explains other parts of Javascript that can be problematic and the techniques that he prefers for handling them. I don't necessarily agree with all of them, but the important thing is that he explains his reasoning.

To effectively learn Javascript, I recommend that you buy 1) a book that covers the details of the language and can be used as a reference (e.g. Javascript, the Definitive Guide) and 2) Crockford's book. Advanced programmers might also enjoy Pro Javascript Design Patterns, which shows a number of ways to combine Javascript with some of the GoF patterns. I would avoid any cookbook style books on Javascript, because you're better off using YUI, JQuery or one of the other Javascript libraries than writing your own drag-and-drops, calendars, etc.

There are a series of Yahoo! videos by Crockford that mirror the material in this book and can be found as podcasts under YUI Theater. They contain nearly all of the material in the book and probably a little more. Those videos are:

- Douglas Crockford/An Inconvenient API: The Theory of the DOM (3 parts)
- Douglas Crockford/The JavaScript Programming Language (4 parts)
- Douglas Crockford/Advanced JavaScript (3 parts)
- Douglas Crockford/Javascript The Good Parts
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


85 of 89 people found the following review helpful:
5.0 out of 5 stars Beautiful book, May 16, 2008
By 
Ask Bjørn Hansen (Los Angeles, CA, United States) - See all my reviews
(VINE VOICE)   
Amazon Verified Purchase(What's this?)
This review is from: JavaScript: The Good Parts (Paperback)
This is a beautiful book.

First of all - at only 170 pages it is short. Even though some of the key points are repeated through the book it's dense with information. You don't need any JavaScript experience, but it's not a "beginning programming" book so if you haven't been programming before this is not the right book for you.

Reading this book a couple of times will give you an appreciation for the JavaScript language that you almost certainly didn't have before. It'll give you tools to write better programs that you and others will actually be able to maintain over time.

I've learned lots of little things that I maybe knew from experience, but now I _know_ and I know why.

This book will help you battle with JavaScript rather than against it.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


35 of 38 people found the following review helpful:
5.0 out of 5 stars Serious JavaScript programming requires strong discipline, June 16, 2008
By 
Foti Massimo (Vezia (Switzerland)) - See all my reviews
(REAL NAME)   
Amazon Verified Purchase(What's this?)
This review is from: JavaScript: The Good Parts (Paperback)
Serious JavaScript programming requires strong discipline to avoid many pitfalls that are somewhat encouraged by the language itself. The author is very aware of this problem and wrote a small, but very dense book, full of useful advices that comes from somebody who has doing sophisticated JavaScript programming for a long time. Crockford is very opinionated, and I don't always agree 100% with his suggestions, nevertheless, even whenever I disagree, I find his points are worth reading, his opinion is always valuable. This book would serve well both veteran JavaScript developers and programmers that, coming from different languages, may get lost among JavaScript's idiosyncrasies.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
prototypal inheritance, noncapturing group, invocation pattern, prototype chain, concat method, object literal, block scope, capturing groups, new prefix, prototype object, inner function, catch clause
Key Phrases - Capitalized Phrases (CAPs): (learn more)
William Shakespeare, Dst Move, Spec Object
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:

What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(28)
(14)
(7)

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject