introduce an application model and controller.render function to render HTML from model