Yesterday, in response to a customer request, I needed to hide some content on the portlet page. Simple enough, I thought. I loaded the portlet using our test harness pattern and chose "View Source" so that I could locate the relevant tag names or HTML comments. Once armed with this data I planned on locating the appropriate page or builder and making the necessary changes.
Not so fast, I realized, there were no comments and the tags were not sufficient to guide me. The presentation layer of the portlet in question consists of four or five models with as few as a dozen and as many as fifty builders in each. In addition, as it turned out, the data I needed to manipulate was found on a page created with a Page builder, loaded by the model through an Inserted Page builder on an HTML page loaded by the model through an Imported Page builder.
It was a MAZE!
TIP: Use HTML comments on pages to identify the source by model and builder. Also, use HTML comments before span tags for a similar process. Your brain will thank you for it and the person who comes in behind you to perform maintenance will be inspired to perform random acts of kindness.
David Wilkerson December 6th, 2007 10:10:53 AM
