title: Object Oriented Javascript best practices?
body: <p>I'm finding myself coding a big project in Javascript. I remember the last one was quite an adventure because hacky JS can quickly becomes unreadable and I want this code to be clean.</p>
  
  <p>Well, I'm using objects to construct a lib, but there are several ways to define things in JS, implying important consequences in the scope, the memory management, the name space, etc. E.G :</p>
  
  <ul>
  <li>using <code>var</code> or not;</li>
  <li>defining things in the file, or in a <code>(function(){...})()</code>, jquery style;</li>
  <li>using <code>this</code>, or not;</li>
  <li>using <code>function myname()</code> or <code>myname = function()</code>;</li>
  <li>defining methods in the body of the object or using "prototype";</li>
  <li>etc.</li>
  </ul>
  
  <p>So what are really the best practices when coding in OO in JS ?</p>
  
  <p>Academic explanations really expected here. Link to books warmly welcome, as long as they deal with quality and robustness.</p>
  
  <p>EDIT :</p>
  
  <p>Got some readings, but I'm still very interested in answers to the questions above and any best practices.</p>