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


Classic Computer Science Problems in Python

Author: David Kopec
Publisher: Manning
Date: March 2019
Pages: 224
ISBN: 978-1617295980
Print: 1617295981
Kindle: ‎ ‎ B09782BT4Q
Level: Intermediate
Audience: Python developers
Category: Python
Rating: 4
Reviewer: Mike James
Classic algorithms in Python - the world's favourite language.



Coding All-In-One For Dummies

Author: Chris Minnick
Publisher: For Dummies
Pages: 912
ISBN: 978-1119889564
Print: 1119889561
Kindle: B0B5BBNW9L
Audience: People wanting to learn to code in JavaScript, Flutter and Python
Rating: 3.5
Reviewer: Kay Ewbank

This book is described as offering an ideal starting place for learning th [ ... ]


More Reviews

Last Updated ( Friday, 15 October 2010 )