1.5. Architecture: Explicit Interfaces and Connectors

The following steps describe how the access between artifacts can be more sophisticated and restrictive:

  1. Create checked architecture file "business".

  2. Create artifacts for all domain aspects ("User", "Contact", etc), check the package structure and create the correct number of artifacts.

  3. Create a dummy artifact that contains all code that is not matched by the other artifacts.

  4. Connect the artifacts with simple "connect" statements.

  5. Create default interface for the artifact "Service" in "components.arc" to restrict what is accessible from the outside. Include all, except "**/*DtoVal" types.

  6. 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.

  7. Check for found architecture violations.

  8. Introduce some dummy references in the code (use the Eclipse project) to produce more architecture violations.

  9. "Refresh" in Sonargraph-Architect and check that the new violations appear.

End of Step 4 (step4_crm-domain-example.sonargraph).

Related topics: