JavaScript for Absolute Beginners |
Author: Terry McNavage Publisher: Apress, 2011 Pages: 504 ISBN: 978-1430272199 Aimed at: Beginners to both JavaScript and programming Rating: 1 Pros: Enthusiastic Cons: Disorganised and confusing Reviewed by: Ian Elliot Given the importance of JavaScript there is a real need for a book for beginners, but writing such a book is a tough challenge.
JavaScript is a strange language and if you are going to succeed in explaining how it works to a complete beginner you have to know what the beginner doesn't know and what the beginner needs to know. The author of this book tries very hard to be user friendly but really hasn't much idea what a beginner needs. Its the equivalent of speaking slowly but not really changing what is said. The start of the book isn't helped by the fact that introductory material is in a section called Preface. It contains important information about how install and use Firebug. As this is one of the ways the book uses to get you to try out JavaScript code it is fairly essential. So if you are like many readers and skip the preface you will have a lot of trouble with Chat per 1. Material as important as this should be in a preface which is traditionally kept for the authors comments, observations and justifications and always something you can skip. Chapter 1 is about representing data with values - a slightly odd way to put it. After an irrelevant and over-long story about Henry V and mud - designed to convince you that programming is easy - the first paragraph actually on programming uses the words string, number, Boolean and object. To a beginner a string is something you use to tie knots in. After a brief discussion of string literals page 3 provides a single column listing of every operator JavaScript owns - why? This isn't something a beginner needs to know at this point. And so it goes on - complete lists of everything are provided in case the book is accused of not being complete. A page 9 we have object literals defined and used without much introduction ot the ideas that lie behind the concept. Chapter 2 jumps in with type conversion and we have longer and longer boring examples and screen dumps that are very difficult to read. This makes it harder but why deal with type conversion at a point were the beginner hasn't even got a clear idea of type and hasn't been introduced to flow of control or anything that even looks like a program? By page 32 we are using string functions to find substrings and so on but still don't know about functions, for loops or ifs. Chapter 3 focuses on operators and is complete, exhaustive and for a beginner exhausting. At Chapter 4 we finally reach controlling flow - but we suddenly take a huge jump in that we are now using functions. As the chapter opening says - Chapter 6 more fully covers functions - true but why introduce them in Chapter 4 where they are quite unnecessary to explaining the flow of control? Chapter 5 is on member inheritance - we have no clear idea of an object and the book deals with inheritance. It's not even as if the chapter sticks to simple inheritance - it introduces mixins using deep copy! Chapter 6 deals with functions and arrays which is an interesting coupling. Despite the fact that the book has been using functions as examples and as constructors in the previous chapter we are back to square one with why use functions. At this point it is clear that the book has morphed into an advanced text book with an occasional "speaks slowly" introduction. Conditional advance loading, lazy loading, closure and recursion are not subjects that a beginner needs to deal with when learning the basics of functions. There is also a lot of mixing of concepts - basic fundamentals like closure and recursion are mixed in with practical considerations like lazy loading. It's simply confusing. The remainder of the book is about practical use of JavaScript in the browser. Chapter 7 is about using the DOM, 8 deals with CSS scripting, 9 is on events and 10 on the BOM bringing the book to a close. You can probably work out that I don't like this book. It's not that I don't like it, more that it is completely unfit for its stated purpose and would probably put a beginner off programming for life. If you are a beginner - avoid it. The sad part is that it is clear that the author knows a lot about JavaScript and could have written a good advanced book but this isn't it. The attempts to pretend that the book is for the beginner makes it disorganised and confusing. So beginner or expert alike - go find a different book.
|
|||
Last Updated ( Tuesday, 15 February 2011 ) |