Javascript revealing module pattern template


/ Published in: JavaScript
Save to your folder(s)

"Javascript module pattern emulates the concept of classes in such a way that we're able to include both public/private methods and variables inside a single object, thus shielding/namespacing particular parts from the global scope."
When inheritance is not needed and a only few instances is needed (Keep in mind that each instance places a new copy of each function in memory!)

URL: http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/#designpatternsjavascript

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.