PrototypeJS Extension: Namespaces for JavaScript

Namespaces are an extremely useful tool when working with numerous classes, functions or even objects in many programming languages. They allow the developer to group these entities in an intuitive way to facilitate readability.

More importantly, namespaces are a mechanism which help to avoid clashing occurrences of unrelated objects which share the same name. This can easily happen when utilizing sources that were developed by separate parties.

A while back I wrote a utility method to ease the support of namespaces within JavaScript. This utility method uses features from the PrototypeJS framework.

Continue reading