You can find an excellent book excerpt on Javascript TDD here on net.tutsplus.com . Even more interesting is that it uses an implementation of the observer pattern… Read more “Javascript Test Driven Development (TDD) book excerpt”
Prototypal inheritance in Javascript
In their book “Pro Javascript Design Patterns”, Ross Harmes and Dustin Diaz expose a complication of prototypal inheritance in javascript linked to updates of compound “prototypal” properties. To solve the same problem Ben Nadel advocates the use of super constructor call from within the sub-class constructor in order to create all the parent object properties in the child object properties. I looked into “Pro Javascript Design Patterns” and at Ben’s solution and came with this first attempt at a solution.