Migrating a large JavaScript project from DOM spaghetti to Backbone.js
Backbone.js is not going to solve your DOM spaghetti problems.You will still bind to events, you will still manipulate the DOM, you will still do all the manual work.I really recommend looking at Knockout.js instead.It really gets rid of all the DOM manipulation code that tends to become so complex and spaghetti like.How? It provides a declarative language for two-way binding between the UI and the data.Check out this example: http://jsfiddle.net/FEVbz/In the HMTL pane, edit the input boxes and watch as the other DOM elements update automagically.Notice how simple and clean the Javascript code is. All it's doing is initialization and setup. Nothing else. No event binding. No dom manipulation. No spaghetti. No nothing.Shameless plug:Here's an article I wrote about why I think Knockout.js is so much better than Backbone.jshttp://dev.hasenj.org/post/35572197519