OOP Javascript
If you’re anything like me, hardcore object-oriented Javascript coding always come with unexpected errors and some of the strangest behavior you can’t really explain.
But that’s always the programmer’s fault, of course. It turns out Javascript isn’t made to be used in a object-oriented way, but rather in a prototype-oriented fashion.
This lengthy post compares Java and Javascript and explains how a Javascript programmer
should implement object inheritance.
I found a few things strikingly useful in there, notably the delegation of the whole obj.prototype reference and the fact he never explicitly declares any class attributes as he does in Java (and how we were trained to do it).