JavaScript MVC practise