The Little Book on CoffeeScript
The JavaScript Developer's Guide to Building Better Web Apps
Publisher: O'Reilly Media
Released: January 2012
Pages: 62
Description
Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreilly The Little Book on CoffeeScript
 
4.3

(based on 3 reviews)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

100%

of respondents would recommend this to a friend.

Pros

  • Concise (3)
  • Easy to understand (3)
  • Helpful examples (3)
  • Well-written (3)

Cons

    Best Uses

    • Intermediate (3)
      • Reviewer Profile:
      • Developer (3)

    Reviewed by 3 customers

    Sort by

    Displaying reviews 1-3

    Back to top

     
    4.0

    Good introduction to CoffeeScript

    By Lola

    from Kitchener, ON

    About Me Developer

    Verified Reviewer

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Expert
      • Intermediate

      Comments about oreilly The Little Book on CoffeeScript:

      The 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.

       
      5.0

      CoffeeScript -> JavaScript + Awesome

      By jQuery Rocks

      from USA

      About Me Developer, Sys Admin

      Verified Reviewer

      Pros

      • Concise
      • Easy to understand
      • Helpful examples
      • Well-written

      Cons

        Best Uses

        • Advanced Student
        • Expert
        • Intermediate

        Comments about oreilly The Little Book on CoffeeScript:

        JavaScript is a quirky, peculiar language – and yet it shines as a fun, productive language, especially when you add jQuery or Dojo to the mix. CoffeeScript caught my eye when it first started appearing on my favorite web development blogs; any tool that can fix the oddities of JavaScript programming gets my full attention, so I was excited to read this book. In retrospect, I'm very glad I picked up this short book.

        Alex nicely covers the use and syntax of CoffeeScript, starting with variable and function declarations, arrays, and logic branching statements (most books on a language begin with these building blocks, so no surprise there). This new language results in significant alterations to the syntax and structure of JavaScript; CoffeeScript bears a strong resemblance to Python, especially in its use of whitespace and indentation, as opposed to the curly braces typically used in JavaScript and other C-style languages. If you're looking for a library that simply enhances JS, as jQuery does, then you might not like CoffeeScript – but I think it's definitely worth learning the alternative syntax of this small new language. I was pleasantly surprised that jQuery and CoffeeScript can easily be used together, effectively complementing each other.

        I found chapters 2, 3, and 4 to be the most immediately useful sections in the book. Classes are discussed in chapter two – creating them revolves entirely around the "class" keyword, which is logical enough. You can create instances of the class with the "new" keyword, and both static properties and instance properties can be included in a given CoffeeScript class. There is also an "extends" keyword for inheritance, and an easy way to create a constructor method.

        Chapter 3 starts with the CoffeeScript versions of ECMAScript 5 additions. The "each" function is more efficient than the ES5 equivalents, "forEach" and "map", due to the way the CoffeeScript code is compiled into JS. Some time is also spent describing the "natural language" style of logical comparisons, using "and", "or", and "is" instead of "&&", "||", and "==".

        Chapter 4 is really cool, and answers a lot of practical questions about implementation. Cake is discussed as a way to compile CoffeeScript; later, the author outlines using Node (server-side JS) to compile the CoffeeScript when the page is requested. Templating systems are also discussed in this chapter, and it's fascinating stuff. The chapter ends with a brief explanation of setting up a Node server on Heroku's Cedar stack.

        Overall, I'm very glad I read this book. I've read some great tech reference books, and I've read some awful ones – this book is definitely one of the better ones.

        I should disclose that I received a free e-book copy of this reference book from O'Reilly, in exchange for a review. I participate in the O'Reilly Blogger Review Program.

        (5 of 5 customers found this review helpful)

         
        4.0

        Sweet little book

        By sandyboy55

        from St. Louis, MO

        About Me Developer

        Verified Reviewer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

        • Too basic

        Best Uses

        • Intermediate
        • Novice
        • Student

        Comments about oreilly The Little Book on CoffeeScript:

        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.

        Displaying reviews 1-3

        Back to top

         
        Buy 2 Get 1 Free Free Shipping Guarantee
        Buying Options
        Save a Tree - Go Digital  what is this?
        Ebook: $7.99
        Formats: ePub, Mobi, PDF
        Print & Ebook: $9.89
        Print: $8.99