Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Jolt Awards

Jolt Awards for Design, Architecture, and Planning Tools

Productivity Award

Restructure 101

Headway Software

The most prevalent software architecture style is still "The Big Ball of Mud." Restructure101 for .Net from Headway Software is a superb weapon in our continuing battle against architecture entropy. Restructure101 parses an application and outputs a graphical dependency map of the components, classes and methods, in a format called Levelized Structure Maps (LSM). The LSMs provide a layered, drill-down/up structure that immediately reveals cyclic dependencies which Restructure101 presents as tangles.

An interesting user interface element is the Complexity Chart. The vertical axis shows the percentage of tangles in your code, and the horizontal axis shows the percentage of how "Fat" your code is. Fatness measures dependencies between methods within a class, or between classes within a namespace, as well as sheer bloat within your methods based on a Cyclomatic Complexity threshold you can configure. As you manipulate your code on the graphical layout, Restructure101 immediate updates the Complexity Chart, showing how fatness decreases as tangles increase, and vice versa.

You can create and manage any number of Sandboxes, which allow you to play and save "what if" structural refactorings of your code. When you have a Sandbox that reflects the structure you want, you can import this new structure into Visual Studio with Headway Software's Visual Studio add-in, which plugs into the VS build system and checks for structure violations whenever you compile your project source files. Each Sandbox is independent from others, and the Sandboxes can be stored in the Restructure101 repository until you delete them.

My evaluation included throwing at Restructure101 a product I am writing in C#/.Net. I was aware of several areas of architectural debt that I had allowed to build up. As an agile practitioner, I try to stay on top of my refactoring and keeping my code clean and understandable. When I pointed Restructure101 to my code, I was impressed with the speed of the UI rendering, and I meandered through the configuration settings to experiment with what Restructure101 could show me. I was also impressed with the variety of ways I could view my code structure: not only did Restructure101 show me the structural problems I already knew about, it showed me several I had no idea existed. My nUnit tests ran clean, my Builds were clean, but my internal dependency structure was not. I am happy to say that the next day my LSM looked much better after dragging my classes and methods around inside the Restructure101 LSM until my tangles were gone, and my fatness was significantly lighter! A couple hours of refactoring in Visual Studio and my code was in much better shape.

The speed of Restructure101's parsing is due to its optimization of data in local projects. Local projects store only the settings (e.g., class path/data file/granularity) required to load and view the code, so the structure of your code is re-created each time you open a project. But Structure101's repository lets you store persistent representations of your code's structure if you wish. Using the repository allows you to perform structural differencing to see changes between different project snapshots over time — a very nice feature.

Although I evaluated ReStructure101 for .Net, Headway Software also offers Restructure101 for Java. Both retail for $900 per individual license, which is locked to a specific machine ID. Special pricing is available for academic or non-commercial personal use, and Structure101 is free for open source projects.

— Gary K. Evans

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.