Reasons why you should use Namespaces in your HTML5 application:
Domain Concept Organization – Great Applications will need a map for future explorers
Decomposing Problems means Composing Managable Solutions - Bridge Seperation
Force Yourself to Understand Data Scoping
Javascript Namespacing Bits
Usage
This particular Namespacing method is rather helpful in that it creates inner containers that carry their own context. This allows you to attach items into the root namespace dynamically without cluttering up the Window. This also means you can attempt garbage collection on the root Namespace object, “MyApp” in this example, freeing up the entire object graphSee Snagging Javascript Memory Leaks for more on how to insure the browser’s native Garbage Collector can free your objects