require.js + backbone.js: How to structure modules that have an initialize function?
问题 I have an application with three pages (which are single-page interfaces). The pages have similar but not identical functionality. So I want to have javascript-modules that provide the common functionality. Then each page may customize/overwrite parts of the common functionality. I'm using backbone.js, so what I do is: load the files containing the common Models, Views, Collections etc. load app-specific files that customize/overwrite parts of step 1 call an init() function that instanciates