title: JavaScript module pattern vs Constructor with methods defined in constructor
body: <p>From a single instance and a multiple instance point of view, why would I write all those extra lines of code following the Module Pattern vs just using a standard Constructor with methods and properties defined in the constructor body?</p>
  
  <p><strong>Module Pattern sample : <a href="http://jsfiddle.net/T3ZJE/1/" rel="noreferrer">http://jsfiddle.net/T3ZJE/1/</a></strong></p>
  
  <pre><code>var module = (function () {
      // private variables and functions
      var foo = 'bar';
  
      // constructor
      var module = function () {
      };
  
      // prototype
      module.prototype = {
          constructor: module,
          something: function () {
          }
      };
  
      // return module
      return module;
  })();
  
  var my_module = new module();
  
  console.log(my_module)
  </code></pre>
  
  <p><br/>
  <strong>Constructor sample : <a href="http://jsfiddle.net/EuvaS/2/" rel="noreferrer">http://jsfiddle.net/EuvaS/2/</a></strong></p>
  
  <pre><code>function Module(){
  
      // private variables and functions
      var foo = 'bar';
  
      //public methods
      this.something = function () {
  
      }        
  }
  
  var my_module = new Module();
  
  console.log(my_module);
  </code></pre>
  
  <p>To me the end result is pretty much the same. Both can have public properties and methods, both can have "private" variables and methods which can be accessed by the public methods.</p>
  
  <p>Both will define public / prototype methods once for a singleton, both will define them multiple times for multiple instances / clones of the object.</p>
  
  <p>Am I missing something? What is the difference?</p>