Most Helpful Customer Reviews
24 of 24 people found the following review helpful:
5.0 out of 5 stars
The Indispensable Reference - A Worthy Upgrade, January 27, 2007
This review is from: JavaScript: The Definitive Guide (Paperback)
The previous edition of this book, 4th edition, remained at arm's length at all times at work and rescued me repeatedly from various day-to-day JavaScript challenges. It has become tattered from rigorous use. I always loved how the book was organized, with the first half as a walk through the entire gamut of JavaScript's workings -- tutorials, walk-thrus, code samples, cross-browser issues, and practical solutions -- and the second half of the book as a complete JavaScript language and DOM reference. That already very useful format has actually been improved upon. David has combined the DOM API reference and client-side JavaScript reference into a single alphabetized section. Now that I think about it, I did find myself flipping back and forth a lot in the previous edition, so this is a welcome improvement. Each object, property, and method contains a helpful "availability" of that item. This may be the standards spec it came from [DOM Level 2 HTML, ECMAScript v1], the JavaScript version in which it emerged [JavaScript 1.0], or a list of browser versions, if it is a proprietary feature. This is critical info to have at-a-glance - could perhaps save you 2 days of work implementing a non-standard, IE-specific JavaScript feature, when you could have been coding the standards-compliant equivalent. David has removed a lot of the deprecated, not-widely-adopted DOM interfaces that no longer apply to modern browsers. David has also moved focus away from some of the more oddball DOM interfaces that have been replaced by more sensible JavaScript objects that implement those interfaces, for example, window.getComputedStyle() rather than AbstractView.getComputedStyle(). In other words, David has removed all of the "stuff that still exists, but you no longer need to worry about". This makes for a more focused, less cluttered, "on topic", useful tome. I don't need to know about the 10 different methods that browser manufacturers fought over 7 years ago. Tell me what I need to know NOW to write practical, functioning, modern, cross-browser JavaScript. That's exactly what Mr. Flanagan has accomplished.
What else is new in the 5th edition?
1. Nested functions and closures.
2. A dedicated "Classes, Constructors, and Prototypes" chapter, with much more coverage on object-oriented programming in JavaScript.
3. A new chapter on Modules and Namespaces.
4. New chapter on scripting Java with JavaScript.
5. Coverage of the legacy (Level 0) DOM has been combined with the W3C standard DOM. More consolidation. Less flipping back and forth.
6. Cookies and Client-Side Persistence. Updated coverage on cookies, and brand new coverage of other client-side persistence techniques, like IE userData persistence, and Flash Shared Object Persistence.
7. AJAX - Coverage of scripted HTTP calls using the now famous XMLHttpRequest object.
8. XML - Demonstrates how to create, load, transform, query, serialize, and extract info from XML docs.
9. Client-Side Graphics - JavaScript's graphics capabilities. The cutting edge <canvas> tag, SVG, VML, and communicating with the Flash plug-in.
10. Scripting Java Apps and Flash Movies - Another brand new chapter.
So, is the 5th edition worth the purchase? Absolutely. This book is a must-have for any web development library. I turn to it repeatedly. Here's an example.
Last week, I overheard a developer on my team proclaim to someone, "We can't do that. JavaScript can't control stuff in another frame." They went and informed my boss how monumental their task was becoming as they proposed a hacky, inelegant server-side workaround.
I managed to grab the one developer and said, "JavaScript certainly can talk across frames."
"Really?!", he asked, astonished. I opened "The Definitive Guide" to the part on cross-frame scripting and bookmarked it for them.
"Oh, wow! GREAT!", he exclaimed, "That completely solves our problem. Totally cool!" and zipped away book in hand. Hours later, they had it worked out, rather than days with the server-side solution.
I've seen some one-star, complaint-type reviews posted that this isn't a beginner book. Exactly right, but I'm confused as to how a quality rating [of 1 to 5 stars] equates, in any way, to skill level of the book, or its ability to meet someone's self-conceived personal notions of what the book is supposed to contain. There are some overview-type chapters that go over syntax, operators, scope, expressions, and the usual array of language basics, but these reviewers are correct in that this book is not a beginner's tutorial on JavaScript. It is a meat and potatoes, soup to nuts definitive guide and reference on all of the important and practical aspects of JavaScript programming. It is not a cookbook of cute-but-useless cut-n-paste recipes [although there are plenty of USEFUL code examples]. It is not the quick-and-dirty example of how to slap the hottest AJAX library into your site to attempt to make it behave like a Windows app. The chapter on AJAX shows you how to use the XML HTTP object directly, wrapped up in some nice reusable routines, so you can WRITE YOUR OWN AJAX-based features [which I prefer over using someone else's complicated, obfuscated framework].
Great job, again, David! If you develop websites in any capacity, you need this book. It should be on every developer's shelf.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
33 of 36 people found the following review helpful:
5.0 out of 5 stars
The 5th Edition was well worth the wait, August 18, 2006
This review is from: JavaScript: The Definitive Guide (Paperback)
First off, this is a review of the 5th edition, released August 1, 2006. All other reviews prior to that date are talking about previous editions of this book, which are considerably different than the current one.
The reason the various editions of this book have been so good over the last ten years is probably because they have all been written by the same author, David Flanagan, who seems to really know his audience. Part one of the book is pretty much the same as in the previous edition. It acts as a complete tutorial on the language, taking you all the way from basic language constructs into object-oriented programming and finally basic scripting.
Where things get really interesting and cutting edge is in part two of the book, "Client-Side Javascript". Most of the examples we've seen so far, while legal JavaScript code, had no particular context - they were JavaScript fragments that ran in no specified environment. Chapters 13 and 14, "Javascript in Web Browsers", and "Scripting Browser Windows" provide that context. This begins with a conceptual introduction to the web browser programming environment and basic client-side JavaScript concepts. Next, it discusses how to embed JavaScript code within HTML documents so it can run in a web browser. Finally, the chapter goes into detail about how JavaScript programs are executed in a web browser.
Next, the book turns its attention to the Document Object Model (DOM). Client-side JavaScript exists to turn static HTML documents into interactive programs. It is the Document object that gives JavaScript interactive access to the content of otherwise static documents. In addition to the properties that provide information about a document as a whole, the Document object has a number of very important properties that provide information about document content. Chapter 15 explains all of these issues.
Cascading Style Sheets (CSS) is a technology intended for use by graphic designers or anyone concerned with the precise visual display of HTML documents. It is of interest to client-side JavaScript programmers because the document object model allows the styles that are applied to the individual elements of a document to be scripted. Used together, CSS and JavaScript enable a variety of visual effects loosely referred to as Dynamic HTML (DHTML). This is the subject of chapter 16, "Cascading Style Sheets and Dynamic HTML".
Interactive JavaScript programs use an event-driven programming model. In this style of programming, the web browser generates an event whenever something interesting happens to the document or to some element of it. For example, the web browser generates an event when it finishes loading a document, when the user moves the mouse over a hyperlink, or when the user clicks on the Submit button of a form. If a JavaScript application cares about a particular type of event for a particular document element, it can register an event handler - a JavaScript function or snippet of code - for that type of event on the element of interest. Then, when that particular event occurs, the browser invokes the handler code. All applications with graphical user interfaces are designed this way: they sit around waiting for the user to do something interesting (i.e., they wait for events to occur) and then they respond. Chapter 17, "Events and Event Handling", discusses these issues.
The use of HTML forms is basic to almost all JavaScript programs. Chapter 18, "Forms and Form Elements", explains the details of programming with forms in JavaScript. It is assumed that you are already somewhat familiar with the creation of HTML forms and with the input elements that they contain. If not, you may want to refer to a good book on HTML.
The Document object contains a property named "cookie" that, on the surface, appears to be a simple string value. A cookie is a small amount of named data stored by the web browser and associated with a particular web page or web site. Cookies serve to give the web browser a memory, so that scripts and server-side programs can use data that was input on one page in another page, or so the browser can recall user preferences or other state variables when the user leaves a page and then returns. Thus, the cookie property controls a very important feature of the web browser and is important enough to warrant a complete chapter of its own, "Cookies and Client-Side Persistence".
Internet Explorer on Windows, Safari on Mac OS-X, Mozilla on all platforms, Konqueror in KDE, IceBrowser on Java, and Opera on all platforms provide a method for client side Javascript to make HTTP requests. From humble beginnings as an oddly named object with few admirers, it's blossomed to be the core technology in something called AJAX. The object in question is called the XMLHTTPRequest object, and it is not limited to being used with XML. It can request or send any type of document, although dealing with binary streams can be problematical in Javascript. This chapter, "Scripting HTTP", covers these issues. Since AJAX actually stands for "Asynchronous Javascript and XML", the next chapter discusses Javascript and XML working together.
The final two chapters of part two of the book are very cool and interesting to me, but might not be of interest to the standard professional Javascript programmer, since it deals with client-side graphics and movies using Javascript. This includes working with VML, SVG, graphics and Java, and finally using Javascript with Flash 8. Parts three and four form a reference section for Javascript, including the various methods and their usages.
The source code is well commented and explained, as in all previous editions, and is available for download from the book's website. This book is a great instructive textbook and reference on Javascript. I highly recommend it.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
19 of 19 people found the following review helpful:
5.0 out of 5 stars
The one JavaScript book to rule them all..., October 20, 2006
This review is from: JavaScript: The Definitive Guide (Paperback)
I'm a technical trainer, and we've decided to distribute this book as part of our Ajax courseware. We've reviewed many other JavaScript books, but we keep coming back to this one.
Suffice to say - its an excellent Core javaScript coursebook by itself (the first 220 pages). But the latest 5th edition is also a great resource for other Web 2.0 relevant topics: Ajax/Remote Scripting, CSS, Event handling, DOM scripting, ... The fifth edition also includes comments related to the just-release Internet Explorer 7.
Add in another 100+ page Core JavaScript reference section
Plus another 240+ page Client-Side JavaScript Object reference section (classes, methods, properties, and event handlers...such as XMLHttpRequest, Document, Window, Event)
And it all adds up to one thick/heavy book that deserves to be on your bookshelf...
My only complaint - the reference section has changed. Previous editions would tell you specifically which browser versions are applicable. In this edition, the author chose to tell us what standard provides the specification. Ex: "ECMAScript v1". IMHO - I wish the reference section consistently showed both bits of information ALL the time: the specification standard, and the browsers which support it.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
|