Javascript Controller view framework