JavaScript: The Definitive Guide (6e)

Author: David Flanagan
Publisher: O'Reilly, 2011
Pages: 1100
ISBN: 978-0596805524
Print: 0596805527
Kindle:B004XQX4K0
Aimed at: Experienced JavaScript programmers
Rating: 4.5
Pros: Comprehensive and authoritative
Cons: Unwieldy and not helpful to beginners
Reviewed by: Mike James

This is the classic work on JavaScript - indeed many readers consider it really to be THE definitive guide. How does it stack up?

The first edition of this book dates from 1996. Over time it has evolved from a fairly small book to something that is too big to carry and too big to read. The latest, sixth. edition has been expanded to cover ECMAScript 5 and many HTML5 related technologies. Is this really still the definitive guide to JavaScript?

Banner

The first big section of the book Part I is titled Core JavaScript and this is simply a semi-reference work look at the language itself. It works its way through from the basics of variables, functions and object to server-side JavaScript in Chapter 12. On the way it takes in the new features in version 5. There are lots of comments and asides scattered thought the test. The examples tend to be a bit on the long side when the purpose is to present and illustrate a simple idea.

Overall the presentation is very dry and clearly aimed not just at the intermediate programmer but the rather well educated intermediate programmer. For example in the section on closure we have:

"Like most modern programming languages, JavaScript uses lexical scoping."

The only problem with this is that you need to know what it means and my guess is that most readers will have to go and look it up. Not to worry because the next few sentences explain - only they are very difficult to follow unless you already know what a closure is. Once again this isn't necessarily a bad thing - just be aware that this book used adult language rather than dumbing things down.

The biggest problem with this part of the book is that it doesn't give you a clear interpretation of JavaScript and how it should be used. There are lots of places where the author seems to feel the need to explain it as if it was a classical object-oriented language and even in sections that are not comparing it to Java you get the impression that it is still being compared to Java. For example in Chapter 9 we are introduced to the idea of class:

"In JavaScript a class is a set of object that inherit properties from the same prototype object."

More to the point they are a set of object that have been created by the same function object acting as a constructor. The example then goes on to demonstrate how prototype inheritance can be forced on an object that isn't created via a constructor. This isn't JavaScript this is the extended interpretation of the language by a programmer who wants JavaScript to look like Java. This is not a bad thing - we all do it - but it should be made clear that it is an optional extra not the only way to think about things.

There are similar biases towards thinking about JavaScript in a particular way all the way through the book. There are also lots of back and forward refernces that make it hard to follow the plot.

Part II deals with client side JavaScript and describes how JavaScript fits in with the standard browsers. In this section we meet the real world with all its messy problems of browser incompatibilities. There are chapters on the window object, scripting the document object, scripting CSS , event handling  and so on. A chapter on Ajax deals with the XMLHttpRequest and using JSONP. Moving on from pure client JavaScript we have a chapter on jQuery and HTML5 topics such as client side storage, canvas, audio and video, and gelocation and webworkers.

Parts III and IV compose about one third of the book and take the form of two reference works - one on core JavaScript and the other on Client JavaScript. I'm never very sure about the role of reference works when it is so much easier to look things up on the web. In the few weeks I've had the book I have used it to look things up but to be honest most of the time it was much, much easier to do a web search for the same information. Of course you might prefer having a brick of paper on your desk. Most of the definitions in the reference section are good and come complete with occasional examples and references to the earlier parts.

So what is the overall verdict?

The book has grown over the years and this shows in its construction. It is big and intimidating but if you are looking for a "JavaScript Bible" this gets close to being one. It most definitely isn't for the beginner and it probably isn't going to be of much use to the self-taught JavaScript programmer looking to upgrade their skills.

To be the ideal reader for this book you need to be fairly sophisticated about programming and prepared to put work into decoding the text of the book. If you are then this is still the standard work.

 

 

Banner


ASP.NET Core in Action, 2nd Ed (Manning)

Author: Andrew Lock
Publisher: Manning
Date:April 2021
Pages: 832
ISBN: 978-1617298301
Print: 1617298301
Audience: Developers interested in ASP.NET
Rating: 4
Reviewer: Ian Elliot
One big book to cover the one big alternative web tech.



Testing JavaScript Applications

Author: Lucas da Costa
Publisher: Manning
Date: April 2021
Pages: 512
ISBN: 978-1617297915
Print: 1617297917
Audience: JavaScript developers
Level: Intermediate
Rating: 5
Reviewer: Ian Elliot
Testing the most web's fundamental language is clearly important...


More Reviews

Last Updated ( Saturday, 31 January 2015 )