Ask HN: Is there a better way to document complex software architectures?
406 pointsDespite having the 'architect' title for about five years now, I still sit for hours in Visio & Powerpoint to painstakingly drag boxes and lines around to describe systems.
While the system definitions themselves have arguably improved as my skill as an architect has increased, there's been no such improvement in the speed or method I use to describe them. My visuals are perfunctory, powerpoint-fu is lacking, and the end result always has plenty of room for improvement. It then gets saved as PDF and shelved as an artefact that is disconnected from all the other architectures, and the system boundaries are inevitably out of date by the time the next person looks at it.
So much craft has been put into better languages, better compilers, and better IDEs for the software developer, I'm absolutely confused - where is the modern 'IDE' for the Software Architect?
Comments (235) 87 threads
Earlier comments1. You want to build these diagrams faster and perhaps semi-automatically instead of dragging around boxes and lines.
2. You want them to look better and not so perfunctory. To communicate better.
There is kind of an oddball option here which I fell in love with. There’s a tool called Monodraw which is magic for making old school ASCII art diagrams. It’s surprisingly very visually compelling, easy to update and it’s just text so it can be embedddd in source code comments (no PDFs).
The best reason you might consider this over a “big” IDE-type solution is that ultimately good cogent communication requires making choices about what to highlight. An exhaustive auto generated architecture diagram in the same generic style of everything else can make one’s eyes glaze over. When you choose what to show and emphasize you can tell a better “story”.
Yes you have to keep the diagram up to date with major changes, but that’s not a problem if you lower the cost of updating and raise the visibility of the diagram by putting it in code. They even have a CLI now so you can export it in your build process.
Generally architecture is about imposing constraints on the system. If you think about it that way, what you really want is not to be treating Visio and PowerPoint documents as the primary artifacts. You want to define the modules (in Parnas's sense) and their interfaces and executable specifications. You want tooling that lets you constrain what modules may use other modules, automatically test modules, automatically mock modules, and be alerted when the constraints are broken.
Now, most of the tooling for this probably doesn't exist, or exists in partial, widely scattered forms. For example, you can define a Java package with the interfaces of a module and then have some kind of hook in the build system that checks that it is not being imported in places it shouldn't be. You can mark the interfaces that should be considered architectural constraints with a custom annotation and build a tool to extract out all uses of them and plot connections.
But I am unaware of any toolkit that will do what you want.
Basically, pick your battles and just draw what helps communicate something.
All comments shown.
Couldn't load more comments. Check your connection and try again.