TinyMVC provides a great structure for developing new projects, it’s small base allows the developer to write new plug-ins and extend on the existing framework. Below you’ll find a template wrapper I have made to manage the views and assigning of data. The class allows you to set a default view to be used in order to keep consistency throughout; so that you can minimize view code in the controllers.
One of the most useful things you can do in terms of performance is to cache the page you’re currently serving so that no code gets executed again and again when it isn’t needed. I’ve provided a sample below of how you can set-up quick and dirty page caching by including template files in your code.