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
Show all comments
Showing thread 6 of 87
For about 5 years now, the teams I have been on have found great success in the use of DDD. Towards this we have used a tool which not only allows us to visually model the domain using UML, but also performs what we call “code management” (smarter code-gen which doesn’t get in your way, or produce ugly code) which turns the UML into code for our ORM of choice.
All members of the team are required to use the tool and UML to create new domain entities which then automatically become (beautifully formatted) code.
The enormous advantage of this approach is that the documentation (in the form of UML in this case), never goes out of date and lives with the code, it’s literally checked in to our Git repo in an SCM friendly format next to the normal code.
We are always able to talk around these visual models when planning a new feature or strategising a technical solution for a requirement.
An architect can at any time reason about the domain without having to first build up a mental model of it from code.
When juniors ask questions of seniors, they can both talk around the UML so that they quickly get clarity on the best way forward.
I would never go back to building business software any other way.
Our main development focus right now is on usability for new comers and we're improving it regularly.
[1] http://intentarchitect.com/
The second guess is that humans occasionally rewrite the code for optimization. It might then be easier to source controll the code rather than patches.
Continue this thread — 3 replies
Optimization can almost make sense, but maintaining a patch process is almost certainly the superior way to go. If only because it supports staying current on the generated code.
Anything you do that increases the time between the introduction of the bug and the finding of the bug will make it harder to actually fix it.
Continue this thread — 2 replies
This is very useful for cases where you want to model signatures of methods in our tool, but then leave it to the developer to implement the method which performs the business code. If you want to change the signature of the method, for example adding a parameter, then our code generation will add it in without messing up your custom code.
Our own templates generate code which is as beautiful looking and readable as code written by the best developers, and we encourage template writers to do the same. This makes working with the code in your IDE and reading it as much of a pleasure as any other well written code, having it in your SCM also gives you a history of how the code has changed over time.
Finally, use of the tool is optional, if you hand the the repository over to another team, or as a contracter you deliver it to a client, they don't need the tool, and just get code which looks as if it was written by a good developer.
For the other cases you gave, that sounds like what Interfaces were made for. :) Granted, I think we are in a world where tooling not necessarily requiring language constructs is a better place.
Regardless, if you are seeing such success, I would be greatly interested in seeing you open up that tool.
Continue this thread — 1 reply
Our main development focus right now is on usability for new comers and we're improving it regularly.
[1] http://intentarchitect.com/
I appreciate your reply and that it didn't end with "So, you should use program X (the one you work on) because it's the best software". Your objective response is great.
Otherwise, in general we're far more interested in constructive criticism (or even just normal criticism) of our philosophy (and tool) from a place like HN, rather than trying to score a little free "advertising". When the time is right, we'll do proper promotion, and it won't be by spamming forums.