My experience with backbone.js and require.js
November 29, 2013
Maintenance is one of the most important parts in modern web project. If you built super awesome web app but then few months later it's a pain to add new feature or debug it - it's done wrong. Any web project has to be maintainable, no matter if you are the only one developer or part of a team. Write code, so other humans can read it. Backbone.js may not be the greatest example of super clean code structure as it doesn't provide clear guidance for developers how to structure applications, and that's why there are tens or even hundreds of different ways you can organize the code with Backbone.js. But at the same time it's one of the strengths of this library, more than one way of doing things, gives developers enough freedom to be creative but enough rules to follow to keep it readable.
Templates. One of Backbone.js dependencies is Underscore.js, which among other things provides front end templates. So, instead of using "append" or "html" on ajax success - you can just use templates, wrapped in script tag. If you have large app, this may become not very maintainable as you mix html and script tags and then number of templates grow. Require.js has text plugin which allows you to use regular html files with dynamic values.
What front end framework do you prefer?