Thursday, March 01, 2012

Review: "The Little Book on CoffeeScript" by Alex MacCaw, O'Reilly Media

This book might be "little", but don't let that mislead you; it's packed with enough content so that you'll understand all of what CoffeeScript has to offer.

Alex MacCaw does a great job of covering the major features of CoffeeScript in six short, but detailed chapters.

He starts off covering the basic syntax, and then moves on to cover something that is frowned upon by many in JavaScript, but not so much in CoffeeScript: classes.  Initially, I was hesitant to use CoffeeScript's classes prior to reading this book, but after seeing how they are implemented, and how easy they are to use, I was sold.

After covering classes in Chapter 2, you'll learn about CoffeeScript idioms in Chapter 3, such as: each, map, select, min/max, etc.  Chapter 4 covers the Cake build system and shows you how to build and deploy CoffeeScript client-side applications, which is pretty awesome.

The book winds down in Chapter 5 talking about what CoffeeScript improved upon in JavaScript, and what it did not. The final chapter is written by the creator of CoffeeScript, Jeremy Ashkenas. It basically talks about the philosophy of CoffeeScript and invites you to create your own special language as well.

My thoughts on the book:
  • It's short and very easy to read.
  • You'll walk away feeling ready to write some CoffeeScript apps or sprinkle it in your Rails apps.
  • The one negative about the book is that in some parts, some syntax was explained after the fact, which made it difficult to understand some of the examples.
  • Overall, I'd highly recommend picking up a copy as it's concise and easy to read.

No comments: