JavaScript: The New Toys |
Author: T.J. Crowder JavaScript has changed recently and if you know the basics of JavaScript or learned it just a few years ago then there are large chunks of the language you likely haven't met. The idea of "The New Toys" is to cover the new features without going over the old and it is a good idea. If you want to update your JavaScript then this is worth a look. It starts off with an overview of where JavaScript is and how it got there - i.e. how the new toys came about. You really don't need to know this and you can skip it if this sort of things bore you. There is a small section at the end that introduces Babel that you might want to look at. Personaly I think the overhead in getting involved with Babel isn't worth it - just keep to what JavaScript you expect to work everywhere. Chapter 2 is where the book really get started on the toys, although this particular topic - declarations - isn't much "fun". This is where the main problem of the book reveals itself - how much does the reader know? Declarations in JavaScript are a complex mess and if you have never encountered ideas such as hoisting and function scope things are going to be slightly more difficult for you. The book does a good job explaining things, but you are going to encounter more than just the new toys. Declarations are essential but they aren't fun. Chapter 3 moves on to look at what is new in functions and this is where the new toys start to be fun. Arrow functions, default parameters, rest parameters and so on, but all of this is just fluff unless you really understand JavaScript's functions and most don't. Chapter 4 is about class, and arguably this is just a way of covering up the way JavaScript actually works. So much better to understand constructors and prototype chain inheritance than cover it up under something that looks like a standard, class-based, language. Ignoring this, the chapter does a good job of explaining what is happening.
The rest of the book follows the same pattern of introducing blocks of related new features:
The final chapter looks at what is already in the pipeline for future versions and, compared to the big changes of the past, they are small tweeks. Each chapter ends with an Old Habits to New section which compares how things were done and how you should now do them. This is great, but some of the new toys let you do things you couldn't do in the original JavaScript. You might also conclude that there are missing new toys. All of the features needed for Progressive Web Apps are missing, but this isn't unreasonable as they aren't core JavaScript. If you already have a good grasp of JavaScript, this will bring you up to speed on the new features. Seeing how they all fit together is a more difficult task. JavaScript isn't the language it once was, but it is still built on the foundations of the old and you need a good grounding to see the new whole. The danger is that if you just read this book you really might be just playing with the toys. My verdict? A very good book for the old JavaScript expert, not so good for the JavaScript weekend programmer.
To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.
<ASIN:1871962420> |
|||
Last Updated ( Wednesday, 14 October 2020 ) |