title: Embrace or fight Node's lack of type safety
body: <p>I come from a world of languages (Delphi, PHP, Java) where static typing and strong OOP adherence prop up and empower the overall architecture. Whether it be using abstract classes for facade definitions, or interfaces to support DI, they all have guided my ability to develop architectures solving complex business problems. </p>
  
  <p>NodeJS (more generally, Javascript) has a very weak sense of types, so called "duck typing" and I'm finding I cannot apply traditional (and powerful) techniques to the same degree in Node. If I want to write some facade to a database, I can, sure, but the person who writes a mock or stub has no method signatures to design against - he/she must look at my module ("class"). This would be much easier if I could use an interface, but indeed, I cannot without some extra plumbing.</p>
  
  <p>When building complicated, loosely coupled applications in Node, should I embrace this lack of typing (and if so, how?) or, utilize an OOP library for Node (such as DejaVu) and thus gain "type safety", albeit at a cost of run-time type checking. I'm leaning towards the second, as it allows me to write contract driven code with an added layer of run-time protection.</p>