Framework for javascript application