Archive for January, 2010

Mixin Classes as a way to reuse JavaScript code

Sunday, January 3rd, 2010

This is a useful example of how you can augment a Class to have a particular method but not by using strict inheritance or by duplicating the relevant code for each Class you have. I came across this technique (known as “Mixin Classes”) while reading the book “Pro JavaScript Design Patterns”.

(more…)