Using Backbone.js with CoffeeScript

If you start writing an application using Backbone.js and Coffeescript as we did recently, you’ll quickly discover that they are both great tools. However, what you may not notice right away if you’re new to Coffeescript is that there are certain parts of Backbone’s example Todos application that become unnecessary or clunky if translated verbatim […]

namespace: a CoffeeScript Nugget

I recently stumbled upon the namespace function in CoffeeScript’s FAQ. It helps me follow the module pattern by writing code like this: namespace "Matt.Printer", (exports) -> message1 = "Yo ho ho" message2 = "Five dwarves" exports.print1 = -> console.log message1 exports.print2 = -> console.log message2 Instead of like this: window.Matt = {} Matt.Printer = (-> […]