Javascript design patterns [carldanley.com]