Top "Module-pattern" questions

Popular JavaScript pattern, var Module = (function() { ... })();

Javascript: Module Pattern vs Constructor/Prototype pattern?

I would like to know if the module pattern or Constructor/protoType pattern is more applicable to my work. Basically …

javascript design-patterns unobtrusive-javascript module-pattern
Strict Violation using this keyword and revealing module pattern

Having trouble getting the following to pass jslint/jshint /*jshint strict: true */ var myModule = (function() { "use strict"; var privVar = true, …

javascript strict module-pattern
how to use the javascript module pattern in a real example?

I am trying to understand the JavaScript Module Pattern. I've seen examples of what it should look like, but I …

javascript jquery design-patterns module-pattern
What is the intention of Ninject modules?

I'm a complete newbie to ninject I've been pulling apart someone else's code and found several instances of nInject modules …

c# dependency-injection module ninject module-pattern
Module pattern- How to split the code for one module into different js files?

For the module pattern, I'm doing something like: (function(namespace) { // tons of code // blabla })(window.myGlobalNamespace); How do I split …

javascript requirejs module-pattern revealing-module-pattern
JavaScript module pattern: How do private methods access module's scope?

When implementing the module pattern, how do private functions access the private properties of the module? I haven't seen any …

javascript module-pattern
JavaScript design pattern: difference between module pattern and revealing module pattern?

I'm reading the book Learning JavaScript Design Patterns recently. What I don't get is the difference between module pattern and …

javascript design-patterns module-pattern revealing-module-pattern
Understanding how JS Module Pattern works

I'm trying to understand js module patterns in use with jQuery. I've edited this a couple of times and will …

javascript jquery design-patterns namespaces module-pattern
JavaScript Module Pattern - What about using "return this"?

After doing some reading about the Module Pattern, I've seen a few ways of returning the properties which you want …

javascript design-patterns module-pattern
JavaScript module pattern vs Constructor with methods defined in constructor

From a single instance and a multiple instance point of view, why would I write all those extra lines of …

javascript constructor module-pattern