Advanced Search
Start Your Free Trial

Overview

Other Readers Also Read...
jQuery in Action

jQuery in Action
by Bear Bibeault; Yehuda Katz

Pro JavaScript™ Design Patterns

Pro JavaScript™ Design Patterns
by Ross Harmes; Dustin Diaz

Top Sellers in this Category

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.

Amazon.com® Reader Reviews (Ranked by Helpfulness)

Average Amazon.com® Rating: 4.0 out of 5 rating Based on 55 Ratings

High hopes, Sad reality - 2009-11-01
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Abstracted from the Preface:

"intended for programmers who, by happenstance or curiosity, are venturing into JavaScript for the first time" 1

"This is not a book for beginners" 2

And this is just the first page of the preface. While preparing comments on this book, I reread the preface no fewer than five times in a vain attempt to divine the meaning behind these conflicting statements.
I emphasize the term "reread" since in crops up real soon:

"it takes multiple readings to get it" 3

The first page of the preface provides the key to understanding this book. The book is far too short on explanations and context. You're forced to read and reread important material to extract any return from your investment. And rereading the material is no guarantee that you get useful insight. So much is assumed that you better have the Rhino book handy.

The sad reality is that with thoughtful treatment, this book could be a blockbuster for advanced JavaScript programmers tasked with building the next jQuery or similar library. Since most programmers are library consumers, this also implies that only a small subset of programmers might benefit from a complete discussion of the advanced subject matter only hinted at in this book. As an aside, It would make the library consumers of the world, well.. better library consumers and there is value in that as well.

1. From the preface, page xi, first paragraph, first sentence.
2. From the preface, page xi, third paragraph, first sentence.
3. From the preface, page xi, fourth paragraph, fourth sentence.



Repetitive, opinionated, and cranky - 2009-10-12
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Short but repetitious. A bad combination. Majorly disappointed by this one.

First of all, it's not really a JavaScript book - much of the advice offered is very generic. Like YOU MUST USE PARENTHESES AROUND CONDITIONAL BODIES. Repeated three times. And the evils of ++ and -- operators. The author forbids these even in for loops. Huh?

I don't care about the code for solving the Towers of Hanoi. I want to learn more about JavaScript! Unfortunately the descriptions of prototypes, functions, inheritance, in here are so terse that I have to spend far longer than is necessary in rereading them.

The "railway" diagrams are pure filler. Page after page. Come on, NOBODY reads these.

And what have regexps got to do with JavaScript per se? Nothing... so why do we need a whole chapter on them?

For that matter, why does Yahoo! NEED a "Chief JavaScript Architect"? Bet Google doesn't have one.

JavaScript only survived the first year of its life because Applets were so obviously useless. It only survived its childhood because teenage hackers liked its lack of a type system and its simple way of doing simple things (badly); and it is only alive today because AJAX came along. I wanted this book to change my mind about how awful the language is. It didn't. Instead I got the semi-random ramblings of someone who's invented some fairly trivial tool - JSLint - and thinks it solves everyone's problems. Well, it doesn't. My IDE does a better job these days.

Unique Approach - 2009-11-13
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I love this book. Mr. Crockford covers a ton of very usable information in a relatively small volume. If you are the kind of developer who likes to be spoon-fed popular programming idioms, you might want to look elsewhere. If you want to master the nuts and bolts of JavaScript, this elegantly condensed and filtered version of the ECMAScript specification is probably for you. I would welcome a similar treatment of Python and Ruby. The author's no BS approach is refreshing.

A few gems, but too much filler - 2009-11-08
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This book has some good parts, even some great parts. Many parts of Chapters 3, 4, and 5 are very insightful, and might revolutionize how you think about Javascript, even programming in general. (Unless you come from a Lisp or functional programming background, in which case the insights will be old hat to you).

Unfortunately, the book as a whole seems to suffer from an identity crisis, or a lack of effort by the author to craft a consistent work, or perhaps a struggle between the author and publisher. Whatever the cause, it seriously compromised the quality and integrity of what could have been an amazing book. Instead of the tome of grand enlightenment that it should have been, we are left with a few gems buried amidst mounds of useless filler material.

The introduction explains that this is not a book for beginners, which is true, because beginning programmers would find most of Chapters 3, 4, and 5 to be completely impenetrable. Even experienced programmers may find them difficult to grasp. As the introduction says, this book is "small but dense," which is a nicer way of saying that it throws advanced techniques and code samples at the reader without sufficient explanation.

The introduction also explains that this is not a reference book, which is also true, because it does not describe the DOM at all, nor even list all the standard methods and functions built into Javascript. The introduction suggests that the reader should go look on the internet to find such references, which you'll certainly need to do if you plan to actually use Javascript for anything. But despite it not claiming not to be a reference book, the author decided in Chapter 8 to present a mishmash of standard methods, without any clear reason for why some are listed and others omitted, nor even a mention of the fact that there are others you should be familiar with.

And even though it is not a reference book or a book for beginners, a significant chunk of the book is spent explaining very basic concepts that the target audience is undoubtedly already familiar with. For example, 14 pages are spent explaining the syntax for whitespace, numbers, strings, if statements, while loops, and so on, all of which will be nothing new to anyone who has used C, C++, Java, etc. The book even provides railroad diagrams to illustrate each syntax, which adds thickness but little value to the book, then repeats them in Appendix D to add another 10 pages of pure bulk.

There is a lot of other filler material, as well, such as the appendix on JSLint, which is a slightly more polished copy of the documentation [...], and the appendix on JSON, which is a slightly more polished copy of the documentation [...], both being pet projects of the author. Neither of these appendices adds value to the book, only thickness.

If Crockford and O'Reilly were interested in offering a really great book, or even a book worth the price tag, they should have cut the filler, expanded the explanations where they are needed, and offered more insights and substantial practical examples.

But I can't really recommend the book as it is now, unless you buy it used or borrow it from a library. You would be better off with a Javascript beginner's guide plus reference to learn the basics, or proper guide to functional programming (regardless of the programming language) to learn the advanced techniques.

Material is good, but author attitude is not - 2009-10-27
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I'm new to javascript and wanted a book just to get me started. I figured this book was as good of a starting point as any.

The material is good, but not always explained very well.

I gave the book only 3 stars because I found the author's blatant bitterness and self-righteousness to be distracting.

Some information on this page was provided using data from Amazon.com®. View at Amazon >


About Safari Books Online • Terms of Service • Privacy Policy • Contact Us • Corporate Licenses • Help • Accessibility | See us on FacebookSee us on Linked InSee us on TwitterRSS

Copyright 2009 Safari Books Online. All rights reserved.