addyosmani/backbone-aura — pull request #5 by dustinboston (2012-02-10 17:22:04+00:00)
Title: Core abstraction

Backbone-aura, and the patterns behind it really got me excited. I wanted to try and abstract the module/facade/mediator pattern out a little bit more into a core framework so that it could be used without the Backbone dependencies. Here's a summary of what I added to the aura core.

* Added a bunch of jsdoc-toolkit comments so it can be documented automatically
* I was still really confused about channels vs subscribers so I needed to add comments for myself
* Modules keep the facade context so there's no way to access the mediator directly
* Modules only need to require the facade, nothing else. Makes it super easy to create a module
* Access to jQuery/Underscore is now through the facade/mediator via util, dom, and events
* This is more inline with your original article, I would guess that MV* stuff (e.g. Backbone) would need to get loaded this way as well
* Made modules into actual Requirejs modules with an autoload method in the mediator
* Should be a config option, still works if you load all the modules on one page like before
* Channels have a 1-1 relationship with modules (so the autoloader can require them)

I'm currently working on an example of extending the core. For example if you wanted to add declarative data binding, you would require the mediator, facade, and permissions modules, and extend each with the functionality required, then call the extended facade from a module. It's not there yet, but this would make it so the core wouldn't have to be touched.

Anyway, love the framework you've started and would love to see it grow into something bigger. Hope this helps with that. :-)