JavaScript Cookbook

Author: Shelley Powers
Publisher: O'Reilly, 2010
Pages: 560
ISBN: 978-0596806132
Aimed at: Javascript programmers
Rating: 4
Pros: Wide selection of recipes
Cons: Poor explanations of object-oriented topics
Reviewed by: Ian Elliot

 

 

A cookbook is always going to be a mixed bag - but does this one have something for everybody?

 

Author: Shelley Powers
Publisher: O'Reilly, 2010
Pages: 560
ISBN: 978-0596806132
Aimed at: Javascript programmers
Rating: 4
Pros: Wide selection of recipes
Cons: Poor explanations of object-oriented topics
Reviewed by: Ian Elliot

Cookbooks are always difficult to review because how you react to them depends on whether the topics you are interested in overlap with the recipes presented. In this case there has to be something that you find useful as there is such a wide coverage. Some of the recipes are at the level of the obvious - for example Trimming Whitespace from the Ends of a String, which basically comes down to "use trim", but even here there is some extra help just in case the version of Javascript you are using doesn't support trim. The book also doesn't cover IE 6 and often has IE7 workarounds in the recipes.

 

Banner

 

The explanations of how the recipes work is good when what is going on is basically simple but in some of the more advanced recipes - especially anything object-oriented - the explanation were insufficient. Some subtle topics are well explained however like the reason why you shouldn't use an Array object as an associative array.

The book starts off with pure Javascript recipies: strings, regular expressions, dates and time, maths,arrays and functions. Slowly but surely the book heads off into Javascript/browser interaction. Chapter 7 deals with handling events, 8 general browser interaction, 9 forms, 10 debugging and so on. Chapter 11 to 14 deal with the detailed business of interacting with the DOM and using it to control the page - accessing page elements, creating and modifying page elements. Chapter 15 deals with rich media and interactive applications including SVG, Canvas and audio/video.

Chapter 16 is a potted look at object-oriented aspects of Javascript but to be honest you would be better off reading another book on the subject if this is what you are interested in. The final chapters deal with an irregular collection of topics. Chapter 17 is about Javascript libraries - JsUnit and JQuery in particular. Chapter 18 is where Ajax is covered under the title of Communications. Chapter 19 deals with structured data - aka JSON. Chapter 20 is about persistence and mostly deals with cookies, and other methods of saving state. The final chapter deals with other uses including writing browser add-ons, desktop and mobile widgets and the worker API.

One of the problem is working out which of the recipes will work in the environment you are targeting, there are a quite a few uses of HTML5 for example - a problem made worse if you are targeting multiple environments.

Overall this is a useful book and you should be able to find something in it that repays its price.


Banner


Learn to Code by Solving Problems

Author: Dr. Daniel Zingaro
Publisher: No Starch Press
Date: June 2021
Pages: 335
ISBN: 978-1718501324
Print: 1718501323
Kindle: B08FH92YL8
Audience: People wanting to learn Python
Rating: 4
Reviewer: Mike James
Solving problems - sounds good?



Software Architecture In Practice

Author: Len Bass, Dr. Paul Clements and Rick Kazman
Publisher: Addison-Wesley Professional
Pages: 464
ISBN: 978-0136886099
Print: 0136886094
Kindle: B094CPJ96B
Audience: Software architects
Rating: 4.5
Reviewer: Kay Ewbank

This is the fourth edition of a book widely regarded as a classic since its firs [ ... ]


More Reviews

Last Updated ( Friday, 15 October 2010 )