Javascript design patterns demo application