Application framework for JavaScript