Application framework for javascript web application