Module Pattern for Javascript
December 24th, 2008 | Published in Blog, Web Design
The Module Patter in JavaScript is a powerful tool that uses the idea of closures and automatically evaluated functions. After using this technique for a while now it’s hard for me to imagine writing JavaScript in any other way.
The repetition of rewriting long namespaces while calling methods or accessing properties was the one thing that bugged me about using this pattern. To alleviate this annoyance I did some googling and found Again with the Module Pattern. This article will give you an idea about how useful the Module Pattern can be.
Two other good Module Pattern articles, both named A JavaScript Module Pattern, can be found at yuiblog.com and ajaxian.com.