iam in a mood right now and thought it would be great to port my existing plain JavaScript projects to CoffeeScript and BackboneJS to get a cleaner structure for future development. I also like the CoffeeScript syntax and its ability to compile Lint-proved JavaScript.
I found some neat Information about how both of them can work together. -> http://spin.atomicobject.com/2011/05/06/using-backbone-js-with-coffeescript/
But my problem is: Iam not quite sure where to start. I usually structured my JavaScript in a pseudo class-based fashion. Like this:
var node = new function() {
this.add = this.add = function(target) {};
this.set = function(target, options) {};
};
Iam not very familiar with BackboneJS and CoffeeScript in practice. Is it better to start off with a BackboneJS structure and refactor my scripts into that. Or should i rewrite my code in CoffeeScript and move it to BackboneJS afterwards?