Java: The Good Parts: Unearthing the Excellence in Java

Java: The Good Parts. Unearthing the Excellence in Java. By Jim Waldo. Publisher: O'Reilly Media. Release Date: April Pages:
Table of contents

What if you could condense Java down to its very best features and build better applications with that simpler version? In this book, veteran Sun Labs engineer Jim Waldo reveals which parts of Java are most useful, and why those features make Java among the best programming languages available. Every language eventually builds up crud, Java included. The core language has become increasingly large and complex, and the libraries associated with it have grown even more. Learn how to take advantage of Java's best features by working with an example application throughout the book.

You may not like some of the features Jim Waldo considers good, but they'll actually help you write better code. Learn how the type system and packages help you build large-scale software Use exceptions to make code more reliable and easier to maintain Manage memory automatically with garbage collection Discover how the JVM provides portability, security, and nearly bug-free code Use Javadoc to embed documentation within the code Take advantage of reusable data structures in the collections library Use Java RMI to move code and data in a distributed network Learn how Java concurrency constructs let you exploit multicore processors Publisher: Learn how the type system and packages help you build large-scale software Use exceptions to make code more reliable and easier to maintain Manage memory automatically with garbage collection Discover how the JVM provides portability, security, and nearly bug-free code Use Javadoc to embed documentation within the code Take advantage of reusable data structures in the collections library Use Java RMI to move code and data in a distributed network Learn how Java concurrency constructs let you exploit multicore processors Computer Technology Nonfiction Details Publisher: Availability can change throughout the month based on the library's budget.

Java: The Good Parts by Jim Waldo

You can still place a hold on the title, and your hold will be automatically filled as soon as the title is available again. The OverDrive Read format of this eBook has professional narration that plays while you read in your browser. You've reached the maximum number of titles you can currently recommend for purchase. Your session has expired.

Please sign in again so you can continue to borrow titles and access your Loans, Wish list, and Holds pages. If you're still having trouble, follow these steps to sign in.

Java: The Good Parts

Add a library card to your account to borrow titles, place holds, and add titles to your wish list. Add it now to start borrowing from the collection. The fourth chapter covers exception handling, method cascading, and type augmentation. The section on "Augmenting Types" presents multiple examples of adding "significant improvements to the expressiveness of the language" by "augmenting the basic types" via addition of methods to appropriate prototypes.

The sections on "Recursion," "Closure," and "Module" are where things got a bit dense for me and I needed to read several portions of these sections more than once to more fully appreciate the points being made. I believe I still have a ways to go to understand these concepts completely, but I also believe that understanding them well and implementing the module concept presented here is the key to happiness in large-scale JavaScript development.

The "Curry" section of Chapter 4 states that JavaScript lacks a curry method, but explains how to address that by associating a curry method with Function. The "Memoization" section demonstrates how to use memoization in JavaScript so that "functions can use objects to remember the results of previous operations, making it possible to avoid unnecessary work. The Good Parts 's fifth chapter begins by briefly explaining the two "useful services" that inheritance provides in "classical languages such as Java ": It is explained that JavaScript is dynamically typed and therefore gains a single advantage from inheritance: Crockford states that "JavaScript provides a mucn richer set of code reuse patterns" than the "classical pattern.

Java Internship - Evolet Technologies, Bangalore

The "Pseudoclassical" section of Chapter 5 begins with the assertion that "JavaScript is conflicted about its prototypal nature. The most "serious hazard" occurs when a developer forgets to use new when calling the constructor function. Crockford warns that in such cases, this is associated with the global object rather than the likely intended new object. The author states that convention is to use uppercase for the first letter of the "constructor function" objects" to indicate this risk, but he advises that the better course is to not use new or the constructor invocation pattern at all.

This discussion in the "Pseudoclassical" section of Chapter 5 provides more detail on issues Crockford raised with the "constructor invocation pattern" in Chapter 4. These two sections forced me to acknowledge that while I've liked using the constructor invocation pattern in JavaScript, it's only because "the pseudoclassical form can provide comfort to developers who are unfamiliar with JavaScript.


  • Identity Theft: Terrorists are on the Prowl (House of Beads Mystery Series Book 4).
  • JavaScript: The Good Parts.
  • Java :the good parts /Jim Waldo. – National Library.
  • Case Histories: (Jackson Brodie) (Jackson Brodie series Book 1).

Chapter 5 introduces object specifiers and dives into coverage of JavaScript's prototypal implementation and differential inheritance. The "Functional" section of this fifth chapter illustrates how to use a functional approach to reuse and states that this functional approach "requires less effort than the pseudoclassical pattern and gives us better encapsulation and information hiding and access to super methods. The 6-page sixth chapter of JavaScript: The Good Parts introduces the concept of an array and mentions a couple of its benefits, but laments, "Unfortunately, JavaScript does not have anything like this kind of array.

Chapter 6 discusses JavaScript's "unconventional" length property for JavaScript "arrays" and introduces syntax for accessing elements, push , and delete.

Покупки по категориям

The sixth chapter wraps up with discussion regarding adding methods to JavaScript's Array. Specific code examples include a function thar initializes the delements of a JavaScript array and a function that initializes the elements of a matrix array of arrays. The nearly 23 pages of JavaScript: The Good Parts 's seventh chapter focus on applying regular expressions in JavaScript.

For those who have used other implementations of regular expressions particularly Perl's or implementations based on Perl's , this will be fairly familiar. Crockford points out several motivations for keeping regular expressions simple, but a JavaScript-specific motivation for simpler regular expressions that he cites has to do with lack of portability between different JavaScript language processors' regular expression support. Chapter 7 introduces two forms of creating regular expressions in JavaScript: The chapter also introduces other JavaScript syntax for working with various regular expression concepts in JavaScript.

These pages summarize the "small set of standard methods that are available on the standard types" in JavaScript. The chapter lists the method signature, brief method description, and examples of using that method for standard methods defined on Array , Function , Number , Object , RegExp , and String. Although these are nice summary descriptions and example usages, this chapter may be the least useful chapter of the book given that these APIs are documented online in sites such as the Mozilla Developer Network 's JavaScript Reference.

The Good Parts 's most pleasantly surprising chapter for me may be Chapter 9.


  • Der Prozeß (German Edition)!
  • Rêve (Dream, The)!
  • Swingin the Dream: Big Band Jazz and the Rebirth of American Culture?
  • Natural High Blood Pressure Treatment (Natural Health Book 4).
  • The Secret Path: Meditation Teachings from One of the Greatest Spiritual Explorers of the Twentieth .

When I was browsing the table of contents and saw "Style," I thought this chapter would be another bland spelling out of what to do and not do stylistically in code. I'm tired of these stylistic discussions. The chapter is fewer than 4 pages, so I did not expect much. It turns out that the ninth chapter has some important observations in its just over three pages on style. I like that Crockford takes the reasons for style concerns with any programming language and emphasizes that they are particularly important in JavaScript.

1 353,82 RUB

My favorite part of Chapter 9 is when Crockford explains his style used in the book for JavaScript code. Some of it is the bland matter-of-taste stuff like number of spaces for indentation, but some of it is motivated by an understanding of JavaScript nuances and limitations. He and my review covers these more in the appendices.

This second-to-last chapter offers some poignant advice regarding coding style and large-scale JavaScript applications:. That puts a greater burden on the users of the language to resist the language's weaknesses. JavaScript provides support for large programs, but it also provides forms and idioms that work against large programs. JavaScript's bad features are the focus of Appendix A "Awful Parts" that "are not easily avoided" and Appendix B "problematic features" that "are easily avoided" , but Crockford focuses Chapter 10 on what he considers JavaScript's "beautiful features.

Appendix A highlights the "problematic features of JavaScript that are not easily avoided" in just over 7 pages. Crockford warns, "You must be aware of these things and be prepared to cope. The body of the appendix opens with an assertion that's difficult to argue with: Perhaps the most interesting discussion for me in Appendix A is the explanation of why JavaScript may somtimes insert semicolons and, instead of fixing things, will make things worse mask more significant code issues.

The six pages of Appendix B "present some of the problematic features of JavaScript that are easily avoided. JavaScript is a sloppy language, but inside it there is an elegant, better language. JSLint helps you to program in that better language and to avoid most of the slop. Appendix C details how JSLint helps JavaScript developers identify global variables and functions, identify potentially misspelled members used only once because misspelled but JavaScript itself won't report , identify missing or extraneous semicolons, identify potential issues of automatic semicolon insertion due to improper line breaking, and identify block statements missing opening and closing curly braces.

I have found that static code analysis tools for Java not only help improve existing Java code, but help me write better Java code in the future as I learn what is considered wrong or bad form, why it is wrong or frowned upon, and how to avoid it. The fourth appendix consists solely of syntax diagrams that graphically indicate how various JavaScript constructs are syntactically constructed. The diagrams are of the portions of JavaScript highlighted in JavaScript: Appendix D is a reference guide similar to Chapter 8 and, like Chapter 8, is probably the least valuable of the book's appendices because it is information that is readily available online.

Most of the material in this appendix was obviously a lot newer to people in when this book was published than it is today because today many developers who don't even know JavaScript very well are aware of JSON. Crockford takes one more shot at this "feature": These dangers have been in the browser since the inception of JavaScript, and will remain until JavaScript is replaced.

The Good Parts is one of those relatively rare technical books that is very hyped and lives up to that hype. It helps the reader to understand how to use the best parts of JavaScript and avoid or reduce exposure to the bad parts of JavaScript. In the process of doing this, it does help the reader to do exactly what the author is trying to accomplish: The Good Parts condenses significant low-level details and important high-level language design discussion into fewer than pages.

Over a million developers have joined DZone.

Books & Videos

Check out this comprehensive, insightful review of the seminal book by Douglas Crockford—JavaScript: Does it live up to the hype? Join the DZone community and get the full member experience. Preface The first page of the Preface is the core content of that section and it provides an overview of what a reader of JavaScript: Good Parts In the initial chapter of JavaScript: Crockford provides a high-level description of JavaScript's good parts: Grammar The second chapter of JavaScript: Functions Chapter 4 of JavaScript: Arrays The 6-page sixth chapter of JavaScript: Regular Expressions The nearly 23 pages of JavaScript: This second-to-last chapter offers some poignant advice regarding coding style and large-scale JavaScript applications: Beautiful Features JavaScript's bad features are the focus of Appendix A "Awful Parts" that "are not easily avoided" and Appendix B "problematic features" that "are easily avoided" , but Crockford focuses Chapter 10 on what he considers JavaScript's "beautiful features.

A Java Dev's Review of "JavaScript: The Good Parts"

Awful Parts Appendix A highlights the "problematic features of JavaScript that are not easily avoided" in just over 7 pages. Bad Parts The six pages of Appendix B "present some of the problematic features of JavaScript that are easily avoided. Syntax Diagrams The fourth appendix consists solely of syntax diagrams that graphically indicate how various JavaScript constructs are syntactically constructed.

The Good Parts deserves the praise and reverence heaped upon it; it is a great book and I cannot think of a JavaScript book that I've read that has done as much for my understanding of this unconventional language as JavaScript: Many technology books rave about the covered language, framework, or library and either don't acknowledge the deficiencies and downsides of the covered item or quickly explain them away as insignificant or inconsequential.

The Good Parts is more effective because it doesn't do this. Instead, Crockford's writing makes it obvious that there are many aspects of JavaScript he likes and finds expressive, but that he also recognizes its downsides.