Demo how to use jQAssistant, Asciidoc, PlantUML, the Kontext E PlantUML jQA Plugin and arc42 to improve the architecture of Uneven Modules in the long run.
-
different ways to use jQAssistant for checking architecture using UML diagrams
-
write Cypher rules in XML
-
later: write Cypher rules in Asciidoc
-
latest: PlantUML is supported to some extend
-
packages.puml
-
Packages a and b, a depends on b
-
see de.kontext_e.packages.a and .b with classes A and B
-
quick, but not so good: make the constraint not fail the check, e.g. severity=info
-
better: declare dependencies that are Technical Debt
-
by a special dependency name 'technical debt'
-
by Cypher statements
-
by some kind of external configuration, e.g. XML, YAML, CSV
-
better: see below
-
-
adding description to the diagram
-
optimal way would be to embed the diagram into the document
-
Asciidoc with Diagram Plugin
-
there are templates around
-
best known is arc42, which comes also as Asciidoc
-
fits nicely with docs as code
-
Chapter 5: Building Block View
-
Packages (or namespaces, directory structures) are technical and near the code
-
Raise level of abstraction
-
Many terms: module, unit, subsystem, component
-
Simon Brown: C4 Model
-
Now draw components
-
UML: Component Diagram
-
Components have nices names
-
Connect to code via description to the diagram
-
e.g. a simple table
Name | Location | Purpose |
---|---|---|
Export |
de.kontext_e.demo.export |
Exports application data to a specified interchange format |
Report |
de.kontext_e.demo.report |
Creates periodic and ad-hoc reports |
-
Convention:
-
first column contains the same Component name as in the diagram (case ignored)
-
second column cointains the location of the code, e.g. package, namespace or directory name
-
more columns contain purpose and other information
-
-
in Brownfield Projects dependencies may be differ from documented or desired
-
e.g. cyclic dependencies where one dependency is wanted and the other is wrong
-
declaration of dependencies that are Technical Debt can be done in a table
From | To | What should be done |
---|---|---|
Export |
Report |
Because there is some utility class in Report; Todo: move this utility class into Component 'Utilities' |
-
There is even an own chapter for Risks and Technical Debt in arc42
-
so TD is no longer implicit in the code, but explicitly documented at the right place in the architecture documentation
-
as long as the documentation follows some conventions, the jQAssistant Concepts and Constraints are agnostic to the projects
-
so can be reused
-
there is a Java Concepts and Constraints Compilation
-
just declare it as a jQAssistant plugin, write arc42 documentation and enjoy the benefits of architecture validation