JavaScript: The Definitive Guide

JavaScript: The Definitive Guide
by David Flanagan

JavaScript: The Definitive Guide
Our Price: $70.70
Availability: Usually ships in 1-2 business days
Buy Used: from $1.99 (click here)
Category: Book
See more book details and other editions


(Click here)
Buy this book at online book store in your country
Canada | UK | Germany | France

Book Summary Information

Author: David Flanagan
Edition: Paperback
Audio: English (Unknown); English (Original Language); English (Published)
Published: 2006-08-24
ISBN: 0596101996
Number of pages: 1032
Publisher: O'Reilly Media

Book Reviews of JavaScript: The Definitive Guide

Book Review: The 5th Edition was well worth the wait
Summary: 5 Stars

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.

Summary of JavaScript: The Definitive Guide

This Fifth Edition is completely revised and expanded to cover JavaScript as it is used in today's Web 2.0 applications. This book is both an example-driven programmer's guide and a keep-on-your-desk reference, with new chapters that explain everything you need to know to get the most out of JavaScript, including:



  • Scripted HTTP and Ajax
  • XML processing
  • Client-side graphics using the canvas tag
  • Namespaces in JavaScript--essential when writing complex programs
  • Classes, closures, persistence, Flash, and JavaScript embedded in Java applications


Part I explains the core JavaScript language in detail. If you are new to JavaScript, it will teach you the language. If you are already a JavaScript programmer, Part I will sharpen your skills and deepen your understanding of the language.



Part II explains the scripting environment provided by web browsers, with a focus on DOM scripting with unobtrusive JavaScript. The broad and deep coverage of client-side JavaScript is illustrated with many sophisticated examples that demonstrate how to:



  • Generate a table of contents for an HTML document
  • Display DHTML animations
  • Automate form validation
  • Draw dynamic pie charts
  • Make HTML elements draggable
  • Define keyboard shortcuts for web applications
  • Create Ajax-enabled tool tips
  • Use XPath and XSLT on XML documents loaded with Ajax
  • And much more


Part III is a complete reference for core JavaScript. It documents every class, object, constructor, method, function, property, and constant defined by JavaScript 1.5 and ECMAScript Version 3.



Part IV is a reference for client-side JavaScript, covering legacy web browser APIs, the standard Level 2 DOM API, and emerging standards such as the XMLHttpRequest object and the canvas tag.



More than 300,000 JavaScript programmers around the world have made this their indispensable reference book for building JavaScript applications.



"A must-have reference for expert JavaScript programmers...well-organized and detailed."
-- Brendan Eich, creator of JavaScript

Internet Books

Book Subjects
Most talked about in Internet Books
PHP and MySQL by Example ImagePHP and MySQL by Example
by Ellie Quigley, Marko Gargenta
Prentice Hall; Published: 2006-12-02; Paperback; Book
Best price: $25.99
Price in other shops: $54.99
Navigate the Net: A Comprehensive Learning Experience for Travel Professionals ImageNavigate the Net: A Comprehensive Learning Experience for Travel Professionals
by Shelly M. Houser
Prentice Hall; Published: 2002-05-24; Paperback; Book
Best price: $12.50
Price in other shops: $61.60
Elijah Lovejoy's ASP Training Course (Complete Video Course) ImageElijah Lovejoy's ASP Training Course (Complete Video Course)
by Elijah Lovejoy
Prentice Hall PTR; Published: 2001-12-18; Hardcover; Book
Best price: $66.49
Price in other shops: $69.99
Weaving a Website: Programming in HTML, Java Script, Perl and Java ImageWeaving a Website: Programming in HTML, Java Script, Perl and Java
by Susan Anderson-Freed
Prentice Hall; Published: 2001-08-16; Paperback; Book
Best price: $19.93
Price in other shops: $110.00
Online Resource Guide for Law Enforcement ImageOnline Resource Guide for Law Enforcement
by Timothy M. Dees
Prentice Hall; Published: 2001-06-30; Paperback; Book
Best price: $1.99
Price in other shops: $44.80
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition) ImageCore Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
by Marty Hall, Larry Brown
Prentice Hall; Published: 2003-09-05; Paperback; Book
Best price: $27.75
Price in other shops: $64.99
Publish it on the Web! Windows, Second Edition ImagePublish it on the Web! Windows, Second Edition
by Bryan Pfaffenberger
Academic Press; Published: 1997-08-13; Paperback; Book
Best price: $9.00
Price in other shops: $37.95
Big Book of FYI RFCs (Big Books) ImageBig Book of FYI RFCs (Big Books)
Morgan Kaufmann; Published: 2000-08-15; Paperback; Book
Best price: $8.50
Price in other shops: $34.95
HITTESDORF CORBA/IIOP CLEARLY EXPLAINED (Clearly Explained) ImageHITTESDORF CORBA/ IIOP CLEARLY EXPLAINED (Clearly Explained)
by Michael Hittesdorf
AP Professional; Published: 2000-03-01; Paperback; Book
The Internet Outdoor Family Fun Yellow Pages: The Online Guide to the Best Outdoor Family Sites ImageThe Internet Outdoor Family Fun Yellow Pages: The Online Guide to the Best Outdoor Family Sites
by Jack Sanders
International Marine Publishing; Published: 1999-05-25; Paperback; Book
Best price: $15.56
Price in other shops: $19.95
Similar Books and other products
CSS: The Definitive Guide ImageCSS: The Definitive Guide
by Eric A. Meyer
O'Reilly Media; Published: 2006-11-14; Paperback; Book
Best price: $22.98
Price in other shops: $44.99
HTML & XHTML: The Definitive Guide (6th Edition) ImageHTML & XHTML: The Definitive Guide (6th Edition)
by Chuck Musciano, Bill Kennedy
O'Reilly Media; Published: 2006-10-24; Paperback; Book
Best price: $22.55
Price in other shops: $49.99
jQuery Cookbook: Solutions & Examples for jQuery Developers (Animal Guide) ImagejQuery Cookbook: Solutions & Examples for jQuery Developers (Animal Guide)
O'Reilly Media; Published: 2009-12-03; Paperback; Book
Best price: $17.40
Price in other shops: $34.99
Ajax: The Definitive Guide ImageAjax: The Definitive Guide
by Anthony T. Holdener III
O'Reilly Media; Published: 2008-02-01; Paperback; Book
Best price: $17.55
Price in other shops: $49.99
Content Management Bible ImageContent Management Bible
by Bob Boiko
Wiley; Published: 2004-11-26; Paperback; Book
Best price: $22.20
Price in other shops: $49.99
CSS: The Missing Manual ImageCSS: The Missing Manual
by David Sawyer McFarland
O'Reilly Media; Published: 2009-08-31; Paperback; Book
Best price: $19.87
Price in other shops: $34.99
Programming PHP ImageProgramming PHP
by Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre
O'Reilly Media; Published: 2006-05-05; Paperback; Book
Best price: $19.55
Price in other shops: $39.99
jQuery in Action, Second Edition ImagejQuery in Action, Second Edition
by Bear Bibeault, Yehuda Katz
Manning Publications; Published: 2010-07-05; Paperback; Book
Best price: $23.95
Price in other shops: $44.99
JavaScript Patterns ImageJavaScript Patterns
by Stoyan Stefanov
O'Reilly Media; Published: 2010-09-28; Paperback; Book
Best price: $16.00
Price in other shops: $29.99
JavaScript: The Good Parts ImageJavaScript: The Good Parts
by Douglas Crockford
Yahoo Press; Published: 2008-05; Paperback; Book
Best price: $16.54
Price in other shops: $29.99
Book store. Illustrated catalog of books on different categories