O'Reilly Book Reviewer

I review for the O'Reilly Blogger Review Program

Sunday, February 19, 2012

Book Review: The Little Book on CoffeeScript by Alex MacCaw

Whether you love it or hate it, JavaScript is back with a louder than ever bang, thanks largely to HTML5. However, frameworks like JQuery provide concise syntax that eliminates the need to write buggy and verbose code. So why CoffeeScript? Curiosity led me to pick up this "little book". It turns out that CoffeeScript is a language that compiles down to JavaScript with a syntax inspired by Ruby and Python. In a little book of 6 chapters and 48 pages, Alex MacCaw cuts to the chase and explains the nuts and bolts of CoffeeScript neatly.

In the first chapter, the author goes over the CoffeeScript syntax, variables, scope, functions, looping, flow control, etc - the usual, gentle, "hello world" type introduction. Things start getting interesting from chapter 2 as the book dives into CoffeeScript classes and goes into a little bit more detail into OO related topics pertaining to CoffeeScript. Chapter 3 covers CoffeeScript idioms like iterating over arrays, using Maps, select filtering, and other operations related to arrays. This chapter also covers how to use external libraries (like JQuery) which is extremely useful.

Chapter 4 introduces the Cake (yummy!) build system to compile CoffeeScript. This is the best chapter in my opinion as it contains detailed information on how to maintain your code and not let it burgeon into sphagetti. I was delightfully surprised to see a section on deployment with Heroku. Chapter 5 guides you into avoiding pitfalls using CoffeeScript. This is really good to know as it will avoid hours of debugging later. Chapter 6 provides a conclusion about the intent and philosophy of CoffeeScript emphasizing that "It's Just JavaScript". The book invokes your curiosity to try out other compile-to-JavaScript languages on your own. The book will not make you an expert in CoffeeScript but does a great job of laying down a strong foundation.

1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me..I am a regular follower of your blog.
    Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from HTML5 CSS3 Javascript Online Training from India .
    or learn thru HTML5 CSS3 Javascript Online Training from India. Nowadays JavaScript has tons of job opportunities on various vertical industry. HTML5 CSS3 Javascript Online Training from India

    ReplyDelete