here are tons of tools developers can use to inspect code they write at the code level, and some even provide metrics about how complex aspects of the code are, but few work at a higher level of abstraction. Headway Software wants to change that and aims to provide a design-level view of the structure of a code base, point out where the fat and interdependencies are, and show you exactly how these impact your code in much more of a graphical way than most developers are used to with a program called Structure101.
Currently, Structure101 supports Java code but Headway officials say they will add support for C/C++, .NET, and Ada in future releases, though no specific timeline has been announced. Structure101 is written in Java and is available with runtimes for Windows, Linux, and Mac OSX. It comes in three flavors:
- Standalone Client: This application can be used to interactively analyze Java byte code. Data can be published to a Structure101 repository to be shared. The cost is $499 per developer license.
- Publisher: This version extracts data created by the standalone application and can be integrated into a build environment. The cost is $999 per server license.
- Publisher Web Application: This version provides web access to the Structure101 repository as well as cross-project trend comparisons. This application is available for free.
The two main areas that Headway says Structure101 is targeted to assist with are to help control structural complexity and overall component architecture. It does this by allowing you to select your compiled code, to analyze the relationships and interdependencies of your code, to view this information directly in an interactive user interfaceand to publish it for the whole team to use.
What Can It Do?
Structure101 helps developers and architects by providing a graphical view of the structure of your code. Primary features supported are:
- Dependency Management: Provides various diagrams showing how all the dependencies in the code are mapped. See figures 1 and 2.
- Dependency Analysis: Provides an interactive way to determine everything that depends on a package, class, or method, and everything that it depends on. There are multiple ways to view this information.
- Structure Analysis: Provides the ability to view the structure of your code from the whole code base including third-party libraries, down to a specific method. In addition, Structure101 can point out specifically nasty groupings of code that need to be addressed. A set of metrics are provided that specifically analyze and point out the areas of code that are in most dire need of attention from a design perspective.
- Impact Analysis: Did you ever want to see what the impact would be to your code to swap out one implementation of a third-party library for another one? Structure101 can show you down to the method what the exact impact will be.
Figure 1. This image shows the dependency graph of the junit package from JUnit 3.8.1. All packages in the junit.jar file are shown in the upper left Package hierarchy window. The Dependency graph in the upper right shows all the packages inside the junit package and their relationships. In this case the relationships between the junit.extensions and junit.framework are selected, which caused the Dependency breakout and other windows to filter out all relationships except for the 39 between these two packages. You can further filter by selecting any of the classes in the Dependency breakout view or selecting at the method level in the view below that.
Figure 2. This image shows how the filters change when the TestCase class is selected in the Dependency breakout view. Notice how the number of relationships is reduced from 39 to three and how the remaining classes are grayed out? This allows you to focus on the specific relationships to the TestCase class.
While numerous tools such as JDepend, Emma, or JTest can provide metrics on your code, most of the metrics are provided in textual format. Structure101 can actually "show" you what these metrics look like in your code and then allow you to "navigate" the structure of your code and see its exact current state.
Installing Structure101 is fairly straight forward. I tried it on Windows 2000 and Windows XP using the same download installer that I downloaded from http://www.headwaysoftware.com/downloads/ . The download page has downloadable packages for Windows, Linux, and OSX; although Headway states that there have been some issues with the OSX version which are being addresses in the next release.
Double-clicking on the download file (structure101_java_69_windows_with_jre.exe) launched the installer, which asked me to:
- Accept the end user license agreement (EULA).
- Provide a directory for Structure101 to install itself in.
- Designate a folder for the installer to put shortcuts in.
- Associate a file with Structure101 for *.java.hsp files. These contain the configuration information for Structure 101 projects.
Accepting all the defaults installed Structure101 in C:\Program Files\Structure101\java. In order to run the program you must request an evaluation key from the download page above. This will result in two files being emailed to the address you register: client.lic and publisher.lic. Copy both of these files to the Structure101 install directory to run the program.