1.4. Architecture: Artifacts, Aspects Files and Standard Connections

The following steps describe how a basic architecture check can be implemented using the Domain Specific Language (DSL):

  1. Create a new architecture file "layers" by right-clicking on the folder "Architecture" in the Files view. Keep the default options and make this architecture file "checked".

  2. Create artifacts "Business", "Integration", "Foundation" with the standard include patterns. Check the context help ( F1 ) for more information.

  3. Right-click on the file in the Architecture Files view and open the Exploration view for the architecture model. You should see red arcs representing violations.

  4. Connect artifact "Business" with "Integration".

  5. Make "Foundation" public, so that it is implicitly accessible by the other artifacts.

  6. Save the changes and check in the Architecture view that the correct components are matched for the artifacts. Verify that the architecture-based Exploration view does not show any violations.

  7. Create new checked architecture file "application". Create artifacts "Startup", "Application" (**/ddaexample/**), Framework (**/dda/**) with the standard include patterns. Connect the artifacts as indicated by the existing dependencies (use the Exploration view).

  8. Use the "apply" statement for "Application" and "Framework" to create the layering defined previously in "layers.arc".

  9. Add the "optional" keyword to the "Foundation" artifact in layers.arc to get rid of the "Empty artifact" warning.

  10. Create the checked architecture file "component". Create artifacts "Controller", "Data", "Domain", etc that correspond with the packages in the code.

  11. Create the connections as the dependencies in the code indicate. Again, use the Exploration view to check for the existing dependencies.

  12. Check for architecture violations in the Issues view. Drill-down to the code and examine the root cause for the violations.

  13. Remove "layers.arc" from the list of checked architecture files. It is now implicitly used, since the layering is checked and applied in the file "application.arc".

  14. An architecture can also be interactively modeled using the Architectural view. Create a new "Architectural View" and create the layering with it.

  15. Export the information to an Architecture DSL file and observe the differences to the manually written architecture file.

End of Step 3 (step3_crm-domain-example.sonargraph).

Related topics: