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


Computer Graphics from Scratch (No Starch Press)

Author: Gabriel Gambetta
Publisher: No Starch Press
Pages: 248
ISBN: 978-1718500761
Print: 1718500769
Kindle: B085BVJG5B
Audience: People interested in creating 3D graphics
Rating: 5
Reviewer: Kay Ewbank

This is a well written book that explains the topic of 3D rendering, and tries its hardest to mi [ ... ]



Administering Relational Databases on Microsoft Azure

Author: Prashanth Jayaram et al
Publisher: Independent
Pages: 622
ISBN: 979-8706128029
Print: B08Y4LBTP4
Kindle: B08XZQJHMK
Audience: Azure DBAs
Rating: 2 or 4 (see review for details)
Reviewer: Ian Stirk

This book aims to help you pass the Azure Relational Database exam DP-300, how does it fare?


More Reviews

Last Updated ( Friday, 15 October 2010 )