The following steps describe how the access between artifacts can be more sophisticated and restrictive:
-
Create checked architecture file "business".
-
Create artifacts for all domain aspects ("User", "Contact", etc), check the package structure and create the correct number of artifacts.
-
Create a dummy artifact that contains all code that is not matched by the other artifacts.
-
Connect the artifacts with simple "connect" statements.
-
Create default interface for the artifact "Service" in "components.arc" to restrict what is accessible from the outside. Include all, except "**/*DtoVal" types.
-
In "application.arc", create a default connector for "Startup" to restrict access to the outside. Only SetupFactories should be allowed to access types outside of its artifact.
-
Check for found architecture violations.
-
Introduce some dummy references in the code (use the Eclipse project) to produce more architecture violations.
-
"Refresh" in Sonargraph-Architect and check that the new violations appear.
End of Step 4 (step4_crm-domain-example.sonargraph).
Related topics: