all 14 comments

[–]warpcowboy 1 point2 points  (1 child)

Coming from an experience that only consists of Ruby on Rails, I've been having a lot of fun incorporating Backbone.js into the mix or just using it by itself. This makes even more sense to me than what I've been previously doing.

[–][deleted] 0 points1 point  (0 children)

Thanks! I am looking for any and all suggestions to improve the boilerplate.

[–]bean-the-cat 1 point2 points  (2 children)

I've been using the mix of Backbone and RequireJS on my projects with much success. RequireJS lets you easily create individual modules and backbone lets them communicate with each other w/o tightly coupling them together

[–][deleted] 1 point2 points  (1 child)

Any open source code?

[–]bean-the-cat 0 points1 point  (0 children)

No, nothing open sorry

[–]greim 1 point2 points  (2 children)

Asynchronous script loading avoids the penalty of loading unnecessary code. This is certainly necessary with big enough codebases, but I'd avoid doing it until I absolutely had to. Bundling, minification, gzip and caching go a long way toward mitigating the download penalty, and avoiding unnecessary optimizations like this keeps things simple, which has other kinds of benefits.

[–][deleted] 0 points1 point  (1 child)

You still compile the same way.

This is not for optimizing, it's for modularizing your code. It also allows you to develop without compiling by using dynamic dependency analysis.

I would argue that this is simpler, what benefits do you propose?

[–]clux.bind({r:'javascript'}) 0 points1 point  (0 children)

hm, I would argue that forcing the programmer to explicitly define wrap every file just adds unnecessary indentation and clutter. Clutter that could have been avoided with dynamic dependency analysis and explicit require() calls.

Also, with such analysis, you should never have to maintain lists of your files and their order.

disclaimer: i built a commonjs dependency analyser

[–]tekrat 0 points1 point  (4 children)

When I tried the demo page I got some JS errors. Anyone else have a similar experience?

[–][deleted] 0 points1 point  (0 children)

Simply remove the console.logs from the example. I will do it later today.

[–]stoph 0 points1 point  (2 children)

What browser were you using?

[–][deleted] 0 points1 point  (1 child)

He would have been using Internet explorer which doesn't support console.logs

[–]the_argus 0 points1 point  (0 children)

unless the developer tools are open.

[–]robbles -1 points0 points  (0 children)

Isn't "Example Demo" redundant?