Any recommendations for tools which build an architecture documentation based on Java code? Had a great chat with @odrotbohm about @moduliths and would like to explore this topic deeper. DSLs are a great way, but unfortunately it's possible to bypass them. /cc @simonbrown
4
2
4
Not sure what you’re looking for is doable in practice. If the code were generated from a higher-level, machine-readable description, you might be able to reverse-engineer the patterns from their implementation. In practice, the code will always diverge from the “standard” way.
2
To recognize different implementations of patterns/stereotypes, even ones you haven’t seen before, actually requires intelligence. I highly doubt even ML approaches are useful given the low number of occurrences in most cases
1
Agreed, that's why the Structurizr component finder has pluggable strategies. There's currently no "out of the box" tool that will successfully translate code to "higher level abstractions" without some manual intervention.
1
1
The trick is to understand how *you* would identify those "higher level abstractions" in your codebase (i.e. what patterns are you looking for, what heuristics are you using?). Then you just automate that process. It's relatively straightforward on well-structured codebases.
2
1
For some definition of “just” :) Agreed, the better structured your code base is, the less challenging the task. The inverse is true as well, though

Nov 24, 2020 · 8:05 PM UTC

1
1
Ironically, the more well-structured the codebase, the less important it is to have that model/diagrams ... because the codebase is easy to understand/navigate as-is.
4
2