« June 2007 | Main | August 2007 »

July 2007

Structure101 IntelliJ Plug-in

This has just been made available for download. It displays architecture diagrams within the IDE, and warns if any code changes are inconsistent with the target architecture.

Intellijsmall

It works more or less like the structure101 Eclipse plug-in except that for now it checks for architecture violations on demand rather than automatically when you do a build.

Structure101 Supports Java 1.5

We have overhauled the byte-code parser to now pick up Java 1.5 constructs (e.g. generics and annotations), plus it is much faster.

You can download the first build that includes the new parser here.

If you currently use the structure101 IDE plug-in you may find that you get bogus warnings on "new" architectural violation when you start using the new parser. This is  because the parser is now finding a few more dependencies related to the Java 1.5 language updates, and thinks they are new compared to your reference snapshot. If it's giving you a headache, you should just republish your reference snapshot to the structure101 repository with the new parser.

Architecture warnings in Eclipse

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:

S101primarylayering

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.

Plugin_2Once 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.