On The Dot...
Talking about all things .NET related

Book Review–The Little Book on CoffeeScript

Thursday, March 8, 2012 6:53 PM

coffeescriptThe Little Book on CoffeeScript, by Alex MacCaw, provides a quick dive into CoffeeScript, a new scripting language which is based off of, and compiles to, JavaScript. It is a simpler form of JavaScript, with syntax and feature implementation that is inspired by both Ruby and Python.

The author does a great job of explaining the differences within CoffeeScript over the JavaScript language, such as using Ruby-style string interpolation instead of JavaScript’s string addition and using Python-style comprehensions over JavaScript-style for loops.

The meat of the book is contained in chapters 2 – 4, diving right into classes, CoffeeScript idioms, and compilation. Throughout the book, the author provides concise code examples to demonstrate the use of CoffeeScript in place of JavaScript, making it easy to follow and understand.

The final chapter of the book was written by Jeremy Ashkenas, the author of CoffeeScript, explaining the philosophy and intent of the language. He simply states that it is “just JavaScript” and encourages readers to experiment with their own compile-to-JavaScript languages, which I thought was a neat way to close off the book.

This book is meant for those that have some experience or background with either JavaScript, Ruby or Python. Without that, readers will not get much out of the book, as it is not meant for beginners.

Intermediate and senior developers will find this book to be quite useful as an introduction into CoffeeScript and its implementation.

Kudos to the author for delivering so much information in less than 43 pages. This book is an easy read, a great start for developers looking to transition from traditional JavaScript to CoffeeScript, and useful to keep handy as a reference book.

The eBook format of this book was provided free through O'Reilly's Blogger Review program. This book can be purchased from the O'Reilly book store at: : http://shop.oreilly.com/product/0636920024309.do