The new version of structure101 lets you define concise, layered architecture diagrams and publish them so that the whole team sees them in Eclipse and gets warnings if they make code changes that are out of whack with the architecture.
Here’s an example architecture diagram:
It defines layering (cells should only depend on lower cells) and composition. What you can’t see is that each cell is mapped to the code by a simple expression (e.g. ‘com.headway.assemblies.*) – this means that violations can be easily discovered. Structure101 can initialize diagrams from code which you can then edit.
Once you publish architecture diagrams to a structure101 repository, the all new Eclipse plug-in gets to work. It displays the diagrams (they’re compact and don’t need much screen space) overlaid with any violations, to which you can naturally navigate. The plug-in also generate warnings or errors (you specify) when you build.
Jeez that’s going to be a helluva lot of errors on my project, I hear you say. But here’s the cool bit – the plug-in can be told to only warn you about any new violations that you create. That way each developer just makes sure they don’t make things any worse, and in so-doing, will occasionally need to refactor out prior violations. With almost no effort, the code-base will evolve towards the intended architecture (the KALOI principle).
So now your team has all the info they need to respect your architecture, how do you know if they’re using it? An RSS feed of course! You can get a notification any time a new violation makes it into the mainline. Sweet.