More Javascript goodness.

As we move more and more into programming in Javascript, it’s helpful to try to keep as many of our good Java habits as possible – although each language does come with its own particular idiosyncrasies. One of Javascript’s bad habits is the pollution of the global name-space. There are a couple of ways we can reduce our risk of collision in the name-space, one of which is the use of the module pattern. The author of the article below isn’t so fond of it, as you might be able to tell from the URL, but he does an excellent job of presenting not just the pros and cons of the pattern, but the pattern itself in a very clear and efficient manner.

Snook.ca – Why I don’t love JavaScript’s Module Pattern

Leave a Reply

Your email address will not be published. Required fields are marked *