A pattern to implement client side templating