SCJP 1.4
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Let me give an example for this. I was looking at one of our early Java web projects. On this project the team wasn't allowed to use JSPs. So they wrote a set of Java classes which walked through a structure of domain objects, and produced the appropriate HTML for a particular domain object. They noticed they were getting duplication in the code for spitting out common HTML structures for fields, tables, etc. So they pulled all of the HTML spitting code out into a second utility class that had methods like renderField (String label). When they did this they noticed that they could make drastic changes to the entire web application's appearance just by altering code in the utility class.
Later on I saw a different project. They were using XSLT to turn XML into HTML pages, much as I do on this site. But they needed to support multiple organizations who wanted the same data displayed in their own format. So they split the transformation into two steps, first producing an intermediate XML with elements like field and table, with second stage actually producing the HTML. They would have a different second stage for each organization.
Although it seems obvious as I write it now, but when I first saw these two projects I sensed there was something similar in their approaches. However it took me several months to understand the key point - splitting a transformation into two steps: logical page and physical (HTML) page. This is the "core of the solution" which I wrote up as Two Step View. One of the great intellectual challenges of patterns is finding and isolating this core amongst all the surrounding stuff that's needed on real projects.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Ernest Friedman-Hill:
I think it might make sense to extend this idea even further, and (for example) further formalize the use of Observers, Decorators, and other patterns within these frameworks.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
Does that sound reasonable?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|