Learning JavaScript
Learning JavaScript

Author: Tim Wright
Publisher: Addison-Wesley
Pages: 360
ISBN: 978-0321832740
Audience: Web designers wanting to become developers
Rating: 1
Reviewer: Ian Elliot

With the subtitle: A Hands-On Guide to the Fundamentals of Modern JavaScript this book promises quite a lot.

What exactly is "Modern JavaScript"? Most programmers would think it is the sort of object-oriented code written in the sort of demo web app that is used to show off Chrome or IE. So a book that promises to introduce you to modern JavaScript is an exciting prospect. Sadly this isn't what the book does.

This is a very traditional introduction to the way JavaScript is used to improve the typical web page. It even starts off by explaining the idea of progressive enhancement and graceful degradation. These are the key ideas if you simply want to add a bit of inline JavaScript to an existing webpage to make it look better in a browser that supports JavaScript. if your intention is to create a web app then the idea of falling back to HTML only is just silly.


So this is not a hard core coders book. It is essentially a book that show how to use JavaScript to enhance and add facilities to a web page. It is a designer-becomes-programmer sort of book, which is a good thing and fulfills a need. The only problem is that if you are a complete beginner to programming this book isn't going to help. It starts off discussing issues that only become important after you know how to program. Indeed the book really doesn't tell you much about programming at all. The first chapter is about progressive enhancement - essentially why you should use JavaScript and how. Then it goes on to JavaScript in the browser - i.e. the DOM but plus a lot of detail on how a browser works.

Chapter 3 is where you might hope that the real JavaScript introduction gets going, but it really is just a list of topics presented in an order that really doesn't make much sense. You will also find a lot of confusion with talk of cache, arrays, associative arrays and so on. Using an array as an associative array is a well-known bad practice, but this book doesn't seem to make the distinction between an object used as an associative array and an array used as an associative array. The real core of programming, loops, conditionals and so on are relegated to a short section at the end of the chapter.

From here the book gets into deeper waters. Chapter 4 discuses the DOM and how to work with it. Notice that we haven't really come to terms with JavaScript objects at this point - i.e. we know nothing of constructors, or why you might want to use objects. Instead we simply learn about how to retrive particular objects by class, Id and type and add and remove objects.

Chapter 5 deals with storing data in JavaScript and this is not what you might expect. It is a basic primer on variables - strings, numbers, boolean and so on. Next it deals with arrays and objects used as vehicles for JSON data. Later we get on to HTML5 storage - local and session. This is a horrible confusion of basic facilities i.e the idea of a variable and complex subsystems. Chapter 6 introduces the idea of functions - beltadley -  and returns to the topic of flow of control with another look at loops and conditionals.

Chapter 7 introduces events and event handling including, a look at touch and orientation events. Then on to Ajax, an important topic, but remember basic programming concepts were only introduced a chapter earlier. Then we switch levels again to look at code organization. which is basically a style guide plus some hints and tips.

The final two chapters deal with more advanced material - using libraries, which is about jQuery, and HTML5 which covers APIs such as geolocation, audio etc.

This book isn't about modern JavaScript; it's about using the language in the way that it tends to be found in web pages. However, it focuses on making use of recent facilities such as those provided by HTML5 and this is the only sense in which it is modern. It also takes a very distant view of what programming is all about. This is programming as a craft targeted at augmenting web sites and as such it has a narrow view. For some applications the view is sufficient to get the job done, but it isn't going to allow you to rise to the challenge of writing anything that resembles a web app or even a web page that is heavy on client-side facilities.

There are also some very odd omissions. For example, there is nothing about error handling or the try..catch statement. There are no advanced techniques such as closures, encapsulation  and absolutely nothing about object oriented programming. The idea of a constructor, local variables, prototype and other basics of JavaScript objects are simply missing.

OK, you may say this book isn't for advanced JavaScript programmers - it aims to teach good but basic JavaScript to non-programmers. The problem is that it doesn't do this at well either. It makes no attempt to get complete beginners to understand the basics of programming. The order that topics are introduced isn't logical and it isn't helpful. The best that can be said is that if you already dabble a bit in JavaScript you might pick up a better approach to the language and what it is used. for. Even in this case it would be a shame because for the same effort you could have learned how to use the language properly. Avoid this book if you can.

See also:

JavaScript Books 2012 on Programmer's Bookshelf


Beginning C# 6.0 Programming with Visual Studio 2015

Author: Benjamin Perkins, Jacob Vibe Hammer & Jon D. Reid
Publisher: Wrox
ISBN: 978-1119092117
Print:  1119096685
Kindle: B01AAVMISU
Audience: Complete beginners/ Beginners with OOP background 
Rating: 2/3
Reviewer: Mike James

C# is still impor [ ... ]

Abusing the Internet of Things

Author: Nitesh Dhanjani 
Publisher: O'Reilly
Pages: 296
ISBN: 978-1491902332
Print: 1491902337
Kindle: B013VQ7N36
Audience: Developers engaged in creating apps for Internet-connected devices
Rating: 4.5
Reviewer: Harry Fairhead

The subtitle - Blackouts, Freakouts and Stakeouts makes thi [ ... ]

More Reviews

Last Updated ( Thursday, 18 October 2012 )

RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.