Model driven JavaScript application framework