Emilio Suarez's WebLog

Saturday, April 12, 2008


As a recent winner of a Productivity Jolt Award, Structure101 gained my attention, and I was also drawn to it by listening to an interview with Juergen Holler one of the co-founders of the Spring framework on Software Engineering Radio.

I played with the trial version and within minutes I was able to create diagrams that displayed graphically the architecture of the application, but most importantly, violations to the the architecture. How does it find violations? These are merely upstream dependencies that basically assumed from the way packages are structure in Java and how Classes call each other. So when classes in two packages reference each other, you have circular dependencies, which are bad for your architecture.

I loaded our application code and in a matter of minutes I was blown away by the simplicity and the power of Structure101 to analyze the organization and design of your code. Structure101 performed the analysis and created the different perspectives where I could see problems in the design. There are 4 perspectives:

  • Overview perspective - where it displays a summary of issues and findings on the code (tangles, architecture violations, metrics, etc.)
  • Composition perspective - where it displays dependency graphs of packages
  • Slice perspective - where it displays the violations, complexity and tangles at different abstraction levels of design
  • Architecture perspective - where it shows a diagram of the architecture and the violations, and makes it very easy to rearrange or create your ideal architecture and see what you need to do to get there.
  • XS perspective - basically shows the relationship of two metrics: size and excessive complexity (XS)
  • Collaboration perspective - this is basically the visualization of afferent and efferent dependencies between the different packages and classes.

Structure 101 is a desktop application and is available for Mac, Windows and Linux and supports Java, C/C++ and Ada and it also has a Web Application component, that allows for publishing diagrams and allowing external users navigate through the different perspectives in a read-only fashion. There are also plugins for the major Java IDEs, IntelliJ and Eclipse that connect with the remote repository and can provide instant feedback to developers when they are breaking the architecture. This is great specially for big teams, where Architects don't have the bandwidth to be policing all the code all the time.

Kudos to Headway Software for a great application, and you can get some more insight information on Chris Chedgey's blog.