How To: Javascript Namespacing
Creating namespaces for javascript on web applications is a very uncommon approach. However, in a world where the possiblity of clashes between variable and function names is very high, especially among scripts from different sources, it becomes important to understand this neat and elegant concept by Dustin Diaz.
Basically the steps that make this possible are as follows:
- Create the Namespace Object as a function literal
- self-invoke the function
- return methods and properties
Last Updated:Thursday, September 02, 2010By:alferoSource#
with your OpenID.
If you do not know what OpenID is,