4 Best Free CoffeeScript Books
CoffeeScript is a very succinct programming language that
transcompiles into JavaScript, so there is no interpretation at
runtime. The syntax is inspired by Ruby, Python and Haskell, and
implements many features from these three languages.
CoffeeScript is closely related to JavaScript without having
its eccentricities. However, CoffeeScript offers more than fixing many
of the oddities of JavaScript, as it has some useful features
including array comprehensions, prototype aliases and classes. It
allows developers to write less code to get more done.
CoffeeScript is a new language, first appearing in 2009. The
first stable release was announced in December 2010.
The focus of this article is to select the finest CoffeeScript
books which help programmers become proficient coding in this
language. The books that we have selected help developers to take
full advantage of the power of CoffeeScript. All of the books are
available to download for free.
All of the texts here come with our strongest recommendation.
So get reading (and downloading).
|
1. Smooth CoffeeScript
|
 |
Smooth CoffeeScript is a book about CoffeeScript and
programming. Start with programming fundamentals, learn about
functional programming with Underscore and problem solving, study
object orientation and modularity. It covers client/server web apps
with Canvas and WebSockets. No previous programming knowledge
is required. The book spans over 200 pages and includes 35
exercises.
The book is an introduction to
programming in CoffeeScript with an emphasis on clarity and
abstraction. It is based on Eloquent
JavaScript by Marijn Haverbeke.
Chapters cover:
- Language
- Introduction
- Basic CoffeeScript
- Functions - provides an introduction into the
subject of Functional Programming
- Data Structures - solves a few simple
problems. The author discusses two new types of values, arrays and
objects, and looks at some techniques related to them
- Error Handling
- Paradigm
- Functional Programming - produces
abstraction through clever ways of combining functions. In this
chapter, the author writes a set of useful functions to
understand how they work and solve problems with them to understand how
to use them
- Searching - introduces new functional
programming concepts and their use in problem solving. It goes
through the solution of two problems, discussing some interesting
algorithms and techniques along the way
- Object Orientation - discusses the ideas at the
core of object-orientation along with CoffeeScript's take on them
- Regular Expressions - a language for
describing patterns in strings. They form a small, separate language,
which is embedded inside CoffeeScript
- Modularity - deals with the process of
organising programs. When structuring a program in
CoffeeScript, we do two things. We separate it into smaller parts,
called modules, each of which has a specific role, and we specify the
relations between these parts
- Appendix
- Language Extras - illustrates some extra
language constructs and idioms that may come in handy
- Binary Heaps - explain the details
behind this data structure
- Performance - comparisons between CoffeScript
and CPython
- Command Line Utility - a utility used to remove
solutions from source files is shown here. The program uses
the asynchronous file system functions in the same manner as server
programs
- Reference
- Language Reference
- Reserved Words
- Underscore
- QuickCheck
- Additional Words
- Footnotes
The book is released under the Creative Commons
Attribution 3.0 Unported License. The download includes book
and full source code with and without solutions.
|
|
2. The Little Book on CoffeeScript
|
|
The Little Book on CoffeeScript quickly teaches
the reader best practices for using this language. The book covers both
the client side and server-side applications as well.
- Discover how CoffeeScript’s syntax differs from
JavaScript
- Learn about features such as array comprehensions,
destructuring assignments, and classes
- Explore CoffeeScript idioms and compare them to their
JavaScript counterparts
- Compile CoffeeScript files in static sites with the
Cake build system. Cake is a super simple build system along the lines
of Make and Rake
- Use CommonJS modules to structure and deploy
CoffeeScript client-side applications
- Examine JavaScript’s bad parts — including features
CoffeeScript was able to fix
This book is released under an open source license. An
updated version of the book (not open source) is available to purchase.
|
|
3. CoffeScript Cookbook
|
 |
| Website |
coffeescriptcookbook.com/ |
| Author |
David Brady, John Ford, Steven Reid, David
Moulton, Sebastian Slomski, and many more
|
| Format |
HTML |
| Pages |
- |
CoffeeScript Cookbook is a compilation of CoffeeScript
recipes for the community written by the community. Each entry details
the problem with an appropriate solution.
Chapters cover:
- Syntax: Comparing Ranges, Code Reuse on Client and
Server, For Loops, Embedding JavaScript
- Classes and Objects: Class Methods and
Instance Methods, Chaining Calls to an Object, Class
Variables, A CoffeeScript Type Function, Cloning an Object (Deep Copy),
and Create an Object Literal if it does not already exist
- Strings: Lowercasing a String, Capitalizing Words,
Repeating a String, Matching Strings, Finding Substrings, Splitting a
String, String Interpolation, Uppercasing a String, Generating a Unique
ID, and Trimming Whitespace from a String
- Arrays: Reversing Arrays, Removing Duplicate Elements
from Arrays, Max Array Value, List Comprehensions, Filtering Arrays,
Creating a String from an Array, Check if type of value is an Array,
Concatenating Arrays, Shuflling Array Elements, Testing Every Element,
Mapping Arrays, Creating a dictionary Object from an Array, Reducing
Arrays, Using Arays to Swap Variables, Define Ranges Array, Python-like
Zip Function
- Dates and Times: Finding Last (or Next) Month,
Calculate Phase of the Moon for a Date, Get Days Between Two Dates,
Finding the Last Day of the Month, Calculate the Date of Easter Sunday,
Calculate the Date of Thanksgiving (USA and Canada)
- Math: Faster Fibonacci Algorithm, Fast Inverse Square
Root, Math Constants, Generating Predictable Random Numbers, a Random
Integer Function, Converting Radians and Degrees, Generating Random
Numbers
- Functions: Recursive Functions, Splat Arguments,
Debounce Functions, When Function Parentheses Are Not Optional
- Metaprogramming: Detecting and Creating Missing
Functions, Extending Built-in Objects
- jQuery: AJAX, Callback Bindings, Create a jQuery
Plugin
- Ajax: Ajax Request Without jQuery
- Regular Expressions: Replacing HTML Tags with HTML
Named Entities, Searching for Substrings, Using Heregexes, Replacing
Substrings
- Networking: Basic HTTP Client, Basic Server, Basic
Client, Basic HTTP Server, Bi-Directional Client, Bi-Directional Server
- Design Patterns: Command Pattern, Bridge Pattern,
Builder Pattern, Singleton Pattern, Memento Pattern, Interpreter
Pattern, Factory Method Pattern, Decorator Pattern, Strategy Pattern
- Databases: SQLite, MongoDB
- Testing: Testing with Jasmine
CoffeScript Cookbook is licensed under the Creative
Commons Attribution 3.0 Unported (CC BY 3.0) license.
|
|
4. Testing with CoffeeScript
|
 |
Testing with CoffeeScript lends the reader through the
creation of a shopping cart system using unit testing and
Behaviour-driven Development (BDD) with the popular framework Jasmine.
The reader learns about using and testing jQuery code, writing more
idiomatic CoffeeScript and building a well thought out and structured,
complex JavaScript application.
The book covers the following:
- Download and set up Jasmine, examines the principles
of Test Driven Development / Behaviour Driven Development, and
introduces the example app that will be built in CoffeeScript, a basket
system for an ecommerce store
- Examine refactoring, the usefulness of writing tests,
and consider how the main part of the app works and the best way of
implementation
- Review and refactor the existing code base
and extend the shopping cart further
- Integrate a third party API and how to test it. The
chapter also examines Spies, Jasmine's stubbing framework
This book is not targeted at the newcomer to
CoffeeScript. The author assumes the reader has a working
knowledge of CoffeeScript, as well as the basics of Behaviour/Test
Driven Development.
|
Last Updated Tuesday, March 19 2013 @ 02:18 PM EST |