In this talk, I describe a JavaScript application architecture that is highly decoupled, encouraging modules to only publish and subscribe to events of interest rather than directly communicating with each other.
It supports your application continuing to function even if particular modules fail; module management - where a central body can manage when modules start, stop or need to be restarted; module-level security and framework agnosisty.
This is where your modules can use one JavaScript framework in the present (eg. jQuery) but support switching to using another framework (eg. Dojo) later on is just one line of code - without having to re-write any modules at all. We do this via abstraction, which this talk also addresses.
Code samples for this talk can be found here: http://addyosmani.com/scalablejs/