Book Review: CoffeeScript in Action

Reviews This post may contain affiliate links. If you buy something we get a small commission at no extra charge to you. (read more)

Many web developers have moved over to TypeScript in place of CoffeeScript because of convenience and features. And with the release of ES6 it seems even more likely that CoffeeScript has been replaced.

But there’s still an audience for the scripting language whether working behind Ruby or just in a legacy production. Learning CoffeeScript should not be difficult and CoffeeScript in Action makes the process pleasing and, dare I say, even fun.

You will need some knowledge of JavaScript to comfortably work your way through this book. But if you already know JS dev concepts(along with functional programming concepts) you’ll have no problem picking up CoffeeScript.

Book Contents

Over 430 pages this book teaches you why to use CoffeeScript, when to use CoffeeScript, and how to properly apply it to everyday project work.

The chapters are split up into three parts: Foundations, Composition, and Applications. The first part teaches fundamentals while the last two parts cover detailed programming and completed work.

Between these three parts you get 13 total chapters which break down like so:

  1. The road to CoffeeScript
  2. Simplified syntax
  3. First-class functions
  4. Dynamic objects
  5. Composing objects
  6. Composing functions
  7. Style and semantics
  8. Metaprogramming
  9. Composing the asynchronous
  10. Driving with tests
  11. In the browser
  12. Modules and builds
  13. ECMAScript and the future of CoffeeScript

The first section explains CoffeeScript mechanics including syntax and behaviors. You learn a little about OOP which quickly moves you into the second section.

There is a drastic leap in difficulty between these two sections so be prepared for that.

In part 2 you’ll study functional programming and asynchronous development. This teaches you through real-world applications how to build apps with CoffeeScript.

I noticed the author often tries to connect real-world situations into the workflow. This can help you understand when CoffeeScript would work best and how to apply it appropriately.

The third part teaches you about unit testing and expanding CoffeeScript through modules. In the very last chapter the author waxes philosophical about ECMAScript and how this affects CoffeeScript development.

Unfortunately the growth of ES2015 is probably the largest issue I have with any CoffeeScript book: not the writing or content, but the language itself.

I would personally rather learn TypeScript over CoffeeScript and I don’t see that trend changing anytime too soon.

But the chapters are well organized and the concepts are explained in a very clear fashion. If you honestly need to learn CoffeeScript and already have a background in JavaScript then this book will get you there.

Pros & Cons

Here’s a quick breakdown of the pros & cons before I go into greater detail.

Pros:

  • Offers clear syntax to guide you through each lesson
  • Brilliant explanations on detailed topics like binding and closures
  • Teaches about workflows and frontend techniques to go along with CoffeeScript

Cons:

  • Too simple of an introduction to CS development
  • CoffeeScript as a dev language is not used much anymore

All of the actual writing in this book is fantastic. It’s super clear and the authors know what they’re trying to say.

I also think the examples are top notch. Each example includes common problems that most developers face along with solutions to those problems. This guide will hold your hand and help you walk through CoffeeScript with confidence.

I think the biggest downside is the fact that almost nobody wants to learn CoffeeScript anymore.

It’s not a bad language. But it’s just not relevant compared to ES2015.

Also the introductory chapters do feel a little too “light” by starting with generic JavaScript topics. If you’re a little shaky with JavaScript then this actually might help you!

I found it to be somewhat annoying and it dragged on for far too long. But I can’t knock off too many points for the authors being extra careful about their readers’ knowledge base.

If you’re adamant about learning CoffeeScript then this book will teach you the theory, the practice, and the workflow to apply it all. And for that I have to give the authors a lot of praise.

But if the applications aren’t useful in modern web development then I’m not sure I can recommend this outright to developers. It’ll teach you CoffeeScript and it’ll teach it to you well. But how you use it is another subject altogether.

Who Is This For?

Because CoffeeScript has basically been overshadowed by ES2015, this book’s material isn’t as useful in the modern dev environment. There are a few people that would find value in learning the language:

  • Devs working on legacy applications
  • Anyone looking to practice various JS libraries
  • Anyone that wants to learn CoffeeScript from scratch

But truthfully studying ES2015 and/or TypeScript would be a much better use of your time.

This is sad to say because CoffeeScript in Action is a brilliant book. It’s very well written and it teaches the concepts well. I’m always impressed by Manning’s work and this title is no exception.

If you genuinely need to learn CoffeeScript for any reason then I would recommend starting with this book.

If you’re just looking for a scripting language to learn I’d honestly recommend TypeScript instead. For that I’d recommend Learning TypeScript which is a brilliant introduction to that language.

Final Summary

For learning practical CoffeeScript in a way that applies to real scenarios I would definitely recommend CoffeeScript in Action.

The early chapters may be tough to get through, especially if your JavaScript knowledge is a bit lacking. But the examples are fantastic and by the end you’ll walk away with intimate knowledge of the CoffeeScript workflow.

Review Rating: 4/5
Tags:

Author:

Alex is a fullstack developer with years of experience working in digital agencies and as a freelancer. He writes about educational resources and tools for programmers building the future of the web.