
I purchased a copy of the CoffeeScript: Accelerated JavaScript Development Book
by Trevor Burnham from Pragmatic Programmers. The book is lightweight at 136 pages with 6 chapters and 4 appendices:
- Getting Started
- Functions, Scope and Context
- Collections and Iteration excerpt
- Modules and Classes
- Web Interactivity with jQuery
- Server-side Apps with Node.js excerpt
- Answers to Exercises
- Ways of Running CoffeeScript
- Cheat Sheet for JavaScripters
- Bibliography
In The Trenches
Although lightweight, this won't be an “easy” book to read, because let's face it, you are learning a completely difference language - CoffeeScript. The writing style is fine and sure CoffeeScript compiles to JavaScript, but the syntax is completely different. I found myself reading a paragraph explaining CoffeeScript Code and then writing code in either TextMate or the Try CoffeeScript Chrome Extension over and over and over again. You can't just read the book at the pool. You have to be at your computer typing in the code samples and experimenting as you read through the chapters.
How It Helps
What really makes this book worthwhile is that it doesn't just regurgitate the CoffeeScript Documentation, which I think is pretty darn good for open source software. The book does a really nice job of explaining the new syntax, the reasons behind the generated JavaScript, and how it helps JavaScript developers avoid those common JavaScript pitfalls by implementing common JavaScript Patterns. Ultimately you will be grinning ear to ear as you realize how much less code you have to write, how much easier it is to maintain and understand the code you have written, and how much more consistent your code will be.
Who Is It For?
If you are an awesome JavaScript Developer, you probably don't need this book. You already understand the nuances of JavaScript and recommended patterns you need to follow. The CoffeeScript Documentation will be enough. However, if you are still coming to grips with JavaScript and some of its pitfalls as well as developing application using Object-Oriented JavaScript, I think you will find the more detailed explanations and examples easier to understand how CoffeeScript helps you, the patterns it follows, and the reasoning behind the JavaScript it outputs. Even though I feel very comfortable progamming in JavaScript, it was nice to have the additional background and context on JavaScript when it came to learning the CoffeeScript Syntax.
Even though I am pretty annoyed at having to learn yet another language :), CoffeeScript just makes sense. It is much easier to write and maintain compared to JavaScript. If you read the CoffeeScript Documentation and it doesn't quite click as to its benefits other than writing cleaner code, the CoffeeScript: Accelerated JavaScript Development Book
will fill in some of those missing pieces nicely.
Check out other reviews on Amazon
.
David Hayden