A cookbook for developing a large scale single page JavaScript application