Code prototype for MVC pattern