?
Get the 1,000-foot View
Erik Doernenburg
As architects, we want to KnoW what good the software is and we are developing. Its quality have an obvious external aspect-the software should are of value to its users-but there are also a more elusive I Nternal aspect to quality, have to does with the clarity of the design, the ease with which we can under-stand, maintain, and extend the software. When pressed-a definition, this is where we usually end up saying "I know it when I see it." But what can we see quality?
In an architecture diagram, little boxes represent entire systems and lines between them can mean anything:a dependency, The flow of data, or a shared resource such as a bus. These diagrams is a 30,000-foot view, like a land-scape seen from a plane. Typically the only other view available are the source code, which is comparable to a ground-level view. Both views fail-to-convey much information about the quality of the software:one are too high level and the other provides So much information this we cannot see structure. Clearly, what's missing is a view in Between-a 1,000-foot view.
This 1,000-foot view would provide information on the right level. It aggregates large amounts of data and multiple metrics, such as method count, class fan out, or cyclomatic complexity. The actual view very much depends on a spe-cific aspect of quality. It can be a visual representation of a dependency graph, a bar chart this shows metrics at a class level, or a sophisticat Ed Polymetric view that correlates multiple input values.
?
?? Manually creating such views and keeping them on sync with the software is a hopeless endeavor. We need tools that create these views from the only true source, the source code. For some VIEWS-A design structure matrix, for example-commercial tools exist, but it's also surprisingly easy to create s pe-cialized views By combining small tools, extract data and metrics with generic visualization packages. A simple example would are to load the output from Checkstyle, which are essentially a set of metrics on the class and Metho D level, into a spreadsheet to render charts. The same metrics could also be shown as a tree-map using the Infoviz Toolkit. A great tool to render complex dependency graphs is GraphViz.
Once A suitable view is available, software quality becomes a little less subjec-tive. It is possible to compare the software under development with a handful of similar systems. Comparing different revisions of the same system would give an indication of trends, while comparing views of different sub Systems can highlight outliers. Even with just a single diagram, we can rely on our ability to spot patterns and perceive aesthetics. A well-balanced tree probably represents a successful class hierarchy; A harmonious set of boxes might show code that's organized into appropriately sized classes. Most of the time a very simple relationship holds:if it looks good, it probably is good.
Erik Doernenburg is a technology principal at ThoughtWorks, Inc., where he helps clients with the design and Implementatio N of large-scale enterprise solutions.
Get the 1,000-foot View