At finn.no we're using a custom TemplateAttributeRenderer (DispatchRenderer in tiles-3).
One of the customisation we have is customised debugging around each template rendering. For us this customised debugging does:
- print "<!-- start insertAttribute /template-name/ -->" before rendering
- print "<!-- end insertAttribute /template-name/ /render-time-ms/ -->" after rendering
- maintains a tree of templates rendered which is printed out as a comment at the bottom of the html, eg
We find this useful for finding relevant jsps quickly, and for finding performance problems within the presentation layer in development and test environments. And I've seen something similar in other websites.
Would it make sense to introduce such an api into DispatchRenderer so to make it possible to plug such debugging in rather than having to override the class. Simply overriding the class is not so simple when using the OptionsDispatchRenderer proposed in
I'm not entirely sure myself so throwing this out there. One problem i can see if that this only works for the DispatchRenderer, although this is intended to be taken advantage of TilesContainerFactory.createTemplateAttributeRenderer(..) where it is specified as the default renderer.
The handleIOException(..) also allows behaviour to be configurable against environment. For development and test we re-throw the IOException, but in production we ignore it and write a warning as a html comment into the response. This makes the "ignore" attribute to the template more of an assert rather than forced.