24
Sep
Module Pattern Objects
September 24th, 2007 by ScottK | | Filed in JavaScriptJust last night I discovered a new pattern for writing encapsulated JavaScript patterns. Christian Heilmann @ Wait Till I Come wrote about the module pattern in the article Show Love to the Module Pattern.
The pattern itself is interesting and would like to test it’s performance. Being that you are creating this on a var object means that after definition it’s immediately available and the new operator is not necessary makes this singleton in nature. Just as JSON pattern objects. However I haven’t tried the test code or built an object as of yet, I wonder how the prototype scoping holds up.
