JavaScript: The Good Parts: The Good Parts [NOOK Book]

Overview

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 ...

See more details below
JavaScript: The Good Parts: The Good Parts

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$13.49
BN.com price
(Save 43%)$23.99 List Price

Overview

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.

Read More Show Less

Product Details

  • ISBN-13: 9780596554873
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 5/8/2008
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 1
  • Pages: 172
  • Sales rank: 134,219
  • File size: 2 MB

Meet 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.

Read More Show Less

Table of Contents

Preface

1 Good Parts 1

Why JavaScript? 2

Analyzing JavaScript 3

A Simple Testing Ground 4

2 Grammar 5

Whitespace 5

Names 6

Numbers 7

Strings 8

Statements 10

Expressions 15

Literals 17

Functions 19

3 Objects 20

Object Literals 20

Retrieval 21

Update 22

Reference 22

Prototype 22

Reflection 23

Enumeration 24

Delete 24

Global Abatement 25

4 Functions 26

Function Objects 26

Function Literal 27

Invocation 27

Arguments 31

Return 31

Exceptions 32

Augmenting Types 32

Recursion 34

Scope 36

Closure 37

Callbacks 40

Module 40

Cascade 42

Curry 43

Memoization 44

5 Inheritance 46

Pseudoclassical 47

Object Specifiers 50

Prototypal 50

Functional 52

Parts 55

6 Arrays 58

Array Literals 58

Length 59

Delete 60

Enumeration 60

Confusion 61

Methods 62

Dimensions 63

7 Regular Expressions 65

An Example 66

Construction 70

Elements 72

8 Methods 78

9 Style 94

10 Beautiful Features 98

Appendix A Awful Parts 101

Appendix B Bad Parts 109

Appendix C JSLint 115

Appendix D Syntax Diagrams 125

Appendix E JSON 136

Index 147

Read More Show Less

Customer Reviews

Average Rating 3.5
( 17 )
Rating Distribution

5 Star

(5)

4 Star

(5)

3 Star

(2)

2 Star

(2)

1 Star

(3)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 17 Customer Reviews
  • Anonymous

    Posted October 17, 2012

    Great tip for super clean code

    I really enjoyed reading this book. It has really helped me settle on some structures that I stick to when I develop now.

    The only reason I did not give this book 5 stars is because alot of the material is very opinionated.

    Also, I am a strong supporter of the continue statement. I have absolutely no idea why it would fall in the "bad parts" category.

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 16, 2008

    Those who can, do, those who can't, teach

    Often this is said as if teaching were an accomplishment of less importance and requiring less skill. But whatever skills Crockford has and whatever information/advice he has to share are completely lost in his inability to teach. This book is terse, brief to the point of obscurity, lacking in explanation, and rushing to show quick, poorly documented examples so that everyone will be impressed with his ability to 'do' even though there is no clear exposition on how all the pieces of the examples work. Having worked deeply in JavaScript for well over a decade I have discovered and utilized many of the ideas here (and was happy to find some new ones), but it is unlikely that anyone who wasn't almost continually sumberged in Javascript day-in and day-out for many years would be able to draw anything constructive out of this book.

    1 out of 3 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 24, 2013

    Waste of my money

    Lots of fluff. Doesn't explain well. I am an experienced programmer with 30+ years experience in assembly,C, C++, Java, C#.Net, PHP, and other languages, but this book doesn't help me learn Javascript. Many page links don't work. I'm deleting this from my NOOK HD+

    Was this review helpful? Yes  No   Report this review
  • Posted December 26, 2012

    For programmers of other programming languages, C/C++ or Java es

    For programmers of other programming languages, C/C++ or Java especially, that want to rapidly learn quality, effective JavaScript should read this book. The focus is on the JavaScript language itself, with very little mention of browser-specific details like DOM. It is certainly a no nonsense book; the terseness is a blessing. You'll begin learning immediately on the first chapter since all of the "beginner" topics so commonly found in these books, like "What is a variable? What is a function? Why a text editor and not a word processor?" are removed. Instead you find out what the good parts and bad parts are and why, like it says on the tin.

    In summary: If you can program already, and need to be brought up to speed on good JavaScript style, then this book will serve you well.

    Was this review helpful? Yes  No   Report this review
  • Posted October 10, 2009

    Too heavy for a beginner

    I'm still not finished. I bought the book because I wanted to brush up on JavaScript since I took it awhile ago in school. It is FULL of great information, but it is so deep that I am buying another book to go along with it: Object-oriented JavaScript.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted September 23, 2008

    It's my way or the highway

    That's Crockford's approach to Javascript. I expected more. The examples were poor and he actually defends them by saying you just have to read them carefully. I think the lessons are muddled and if you're familiar with Crockford then you already know most of what's in this book.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 26, 2011

    No text was provided for this review.

  • Anonymous

    Posted March 23, 2011

    No text was provided for this review.

  • Anonymous

    Posted December 2, 2011

    No text was provided for this review.

  • Anonymous

    Posted September 4, 2011

    No text was provided for this review.

  • Anonymous

    Posted March 14, 2012

    No text was provided for this review.

  • Anonymous

    Posted September 2, 2010

    No text was provided for this review.

  • Anonymous

    Posted January 28, 2012

    No text was provided for this review.

  • Anonymous

    Posted October 14, 2008

    No text was provided for this review.

  • Anonymous

    Posted January 30, 2012

    No text was provided for this review.

  • Anonymous

    Posted March 8, 2011

    No text was provided for this review.

  • Anonymous

    Posted July 26, 2011

    No text was provided for this review.

Sort by: Showing all of 17 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)