Chapter 7: Enforcing the architecture as executable specification
The introduction explains why Maven module boundaries need ArchUnit tests to catch class-level architectural violations and keep WriteFlow’s intended architecture visible and enforceable.
After this chapter you will be able to
- Executable architectural checks. Describe how ArchUnit closes that gap by checking compiled bytecode at test time and reporting class-level rule violations as test failures in CI.
- Complementary architecture enforcement. Distinguish what Maven modules enforce from what ArchUnit rules check, and explain how ArchUnit turns structural rules into failing tests.
- Module boundary blind spots. Explain why a direct handler-to-adapter dependency, a misplaced command annotation, and an inconsistent handler name can compile yet violate the architecture.
- Assembly module test placement. Explain why ArchUnit tests run in spring-boot-assembly: it depends on every module, giving the rules visibility of the full application classpath, and it already provides the Spring bootstrap needed to load rule configuration.
- Complementary architecture defenses. Distinguish what Maven modules and ArchUnit rules contribute to enforcing the architecture.
- Reusable architecture rule configuration. Explain why hardcoded package names limit ArchUnit rules to one project and how externalized YAML lets the same rules protect projects with different package structures.
- Layer configuration properties. Describe how HexagonalArchitectureProperties organizes configuration for each architectural layer, including the packages to scan and the packages the layer may depend on.
- Configured dependency boundaries. Describe how WriteFlow's YAML declares each layer's package locations and permitted libraries, making allowed dependency directions readable without tracing Java imports.
- Architectural contract maintenance. Explain why changes to packages or allowed libraries should be accompanied by a rule-configuration change in the same pull request, including what happens when a new adapter package is added.
- Layer dependency boundaries. Describe which dependencies the domain, handlers, and adapters are allowed or forbidden to have in the rules summarized here.
- Executable dependency checks. Explain how configuration-based ArchUnit rules turn allowed package lists into build failures for forbidden dependencies.
- Shared kernel dependency boundary. Explain which dependencies the shared kernel may have and why it is the architecture’s most restrictive layer.
- Configured dependency rule pattern. Describe how the checker obtains its allowed libraries and expresses the dependency restriction.
- Domain dependency boundary. Explain which packages the domain may depend on and how the checker catches imports that cross that boundary.
- Handler dependency boundary. Describe the handler's broad allowed dependency set and explain why imports from adapters or web and persistence frameworks violate the rule.
- Adapter dependency denylist. Explain why adapters use a denylist rather than the allowlists used for inner layers, and identify the core packages the checker protects.
- Ports versus core implementations. Describe the adapter dependencies this rule rejects and explain the explicit exception for persistence adapters.
- Architectural stereotype placement. Explain how annotation rules protect architectural identity: each stereotype belongs to one layer, so rules forbid some annotations in certain packages and require specific annotations in others. Describe how marking a command as an @ApplicationService misidentifies it as a handler and affects component scanning and architecture tests.
- Layer annotation denylists. Explain how checkers forbid annotations from other layers and describe how to read the forbidden-annotation table.
- Required port and handler stereotypes. State which annotations the architecture rules require on input ports, output ports, and handlers, and explain how required rules complement forbidden-annotation rules.
- Domain Annotation Allowlist. Explain that domain classes may use only the listed architectural annotations or no annotation, and that the allowlist works with forbidden- and required-annotation rules to catch misplaced stereotypes.
- Structural architecture contracts. Distinguish structural rules from dependency and annotation rules, and describe the class shapes they enforce for ports, commands, queries, and use cases.
- Port interface requirement. Explain why input and output ports are interfaces and describe what the InputPortChecker and OutputPortChecker enforce.
- Command and query markers. Explain that commands must implement Command and queries must implement Query because their respective buses rely on those types for dispatch.
- Self-validating factory contract. Explain how validateThenCreate keeps commands valid at construction and reports failure through Either.
- Factory signature enforcement. Describe the method signature the architecture rule checks and why it needs a custom ArchCondition. State how the same check applies to queries.
- Validated construction contract. Explain why a public default constructor must be forbidden on commands and queries, and how this rule works with the validateThenCreate rule.
- Use case generic types. Explain why a command use case must use a Command as its command type argument and a query use case must use a Query as its query type argument, even when another type compiles.
- Predictable use case handler names. Explain how to derive a handler class name from its @UseCase interface and why the convention helps developers navigate the codebase.
- Checker execution requirements. Explain why the architecture checkers need test classes and what each test class must do to evaluate its rules.
- Architectural test class pattern. Describe the common structure of an architectural test class and explain what changes between checker tests. Distinguish the test class’s wiring role from the checker’s rule logic.
- Architectural test class wiring. Explain how WriteFlow's eight architectural test classes connect checkers to the packages they inspect.
- Frozen violation baseline. Explain why freezing a rule helps an existing codebase adopt architectural checks and how later runs distinguish known violations from new ones.
- Graduation to strict enforcement. Explain how a frozen rule becomes a directly enforced rule as existing violations are fixed.
What it builds on
- Code organization: Modules that enforce boundaries (chapter 6) · Maven modules used to enforce dependency boundaries
- Discovering hexagonal stereotypes (chapter 6) · Introduces the architectural stereotypes used to identify components.
- The bootstrap (chapter 6) · The assembly module's Spring Boot bootstrap.
- From use case interface to handler implementation (chapter 4) · The distinction between a use case interface and its handler implementation
- Orchestration without business logic leakage (chapter 4) · Handlers orchestrate use cases
- What an output adapter is (and is not) (chapter 5) · The role of output adapters at the hexagon boundary.
- Why repositories are different: Domain entities cross the boundary (chapter 5) · Why repository boundaries involve domain entities.
- The recommended approach: validateThenCreate (chapter 3) · Introduces the validateThenCreate approach.
Section by section
Introduction
The introduction explains why Maven module boundaries need ArchUnit tests to catch class-level architectural violations and keep WriteFlow’s intended architecture visible and enforceable.
- Limits of module boundaries: Explain why Maven modules can enforce dependency direction at compile time but cannot catch every architectural violation among classes the compiler considers legal.
Why it matters: It explains why a compiling application can still drift away from its intended architecture. - Executable architectural checks: Describe how ArchUnit closes that gap by checking compiled bytecode at test time and reporting class-level rule violations as test failures in CI.
Why it matters: Architectural boundaries become a repeatable build check and living documentation, rather than a convention people must remember.
Key terms: Maven modules, dependency direction, architectural violations, ArchUnit, compiled bytecode, executable tests, living documentation
7.1 Why tests, not just modules
This section explains why compile-time module boundaries need structural tests to catch architectural violations that remain legal Java.
- Complementary architecture enforcement: Distinguish what Maven modules enforce from what ArchUnit rules check, and explain how ArchUnit turns structural rules into failing tests.
Why it matters: Using both checks closes gaps without duplicating constraints the compiler already enforces. - Module boundary blind spots: Explain why a direct handler-to-adapter dependency, a misplaced command annotation, and an inconsistent handler name can compile yet violate the architecture.
Why it matters: These examples show precisely why a successful compilation does not prove that the intended architecture holds.
Key terms: Maven modules, ArchUnit, architectural fitness functions, handler, adapter, ArticleRepository, @ApplicationService, naming conventions
7.1.1 Where the tests live
This section explains why ArchUnit tests run in the assembly module and how they complement Maven module boundaries without affecting production runtime.
- Assembly module test placement: Explain why ArchUnit tests run in spring-boot-assembly: it depends on every module, giving the rules visibility of the full application classpath, and it already provides the Spring bootstrap needed to load rule configuration.
Why it matters: A rule can check application-wide boundaries only if it can see the classes on both sides. - Complementary architecture defenses: Distinguish what Maven modules and ArchUnit rules contribute to enforcing the architecture.
Why it matters: Module structure and architecture tests catch different kinds of drift. - Test-only ArchUnit dependency: Describe when ArchUnit is used and why it adds no runtime overhead.
Why it matters: Architecture checks can inspect production bytecode without becoming part of the running application.
Key terms: spring-boot-assembly module, full classpath, Spring's application context, configuration properties, Maven modules, ArchUnit rules, two layers of defense, test-time dependency, production classpath, .class files
7.2 The configuration foundation
This section explains how externalized configuration makes architecture rules reusable across projects and how configuration connects a use case’s ports, handler, and adapters without making business decisions.
- Reusable architecture rule configuration: Explain why hardcoded package names limit ArchUnit rules to one project and how externalized YAML lets the same rules protect projects with different package structures.
Why it matters: Externalizing project-specific boundaries lets a team reuse its architecture checks without rewriting them. - Use case configuration assembly: Describe how to work from a use case through its input port and handler to the required output ports and adapters, and state what configuration should and should not do.
Why it matters: Tracing the use case’s required connections keeps wiring explicit without moving business decisions into configuration.
Key terms: ArchUnit rules, externalized configuration, YAML, configuration properties record, property binding, input port, application service, handler, output ports, infrastructure adapters
7.2.1 Externalized properties
This section defines the configuration properties for architecture rules and explains how checkers receive them through Spring Boot property binding.
- Layer configuration properties: Describe how HexagonalArchitectureProperties organizes configuration for each architectural layer, including the packages to scan and the packages the layer may depend on.
Why it matters: These properties tell the checkers where to look and which library dependencies a layer permits. - Checker property binding: Explain how the configured properties become available to the architecture checkers in the Spring Boot assembly module.
Why it matters: The checkers can consume the same externalized configuration when architecture tests run.
Key terms: HexagonalArchitectureProperties, FQDNs, allowedLibraries, @Configuration, property binding, ArchUnit library, test classpath, auto-configuration
7.2.2 WriteFlow's rule configuration
WriteFlow records its architectural boundaries in test-only YAML so dependency rules can use a reviewable configuration that changes with the code.
- Configured dependency boundaries: Describe how WriteFlow's YAML declares each layer's package locations and permitted libraries, making allowed dependency directions readable without tracing Java imports.
Why it matters: The team can inspect the intended boundaries in one place instead of inferring them from imports. - Architectural contract maintenance: Explain why changes to packages or allowed libraries should be accompanied by a rule-configuration change in the same pull request, including what happens when a new adapter package is added.
Why it matters: Updating the contract alongside the code helps prevent architectural changes from slipping through unnoticed. - Test-only rule configuration: Describe where the YAML belongs and how checker classes receive its package boundaries, distinguishing architectural test infrastructure from runtime configuration.
Why it matters: This keeps architectural checks configurable without making their package boundaries a production deployment concern.
Key terms: YAML, package structure, dependency allowances, dependency graph, architectural contract, adapters.fqdns, architectural drift, assembly module, src/test/resources, constructor injection
7.3 Dependency rules: Who may import whom
This section turns layer dependency rules into executable checks that catch forbidden imports while allowing existing violations to be frozen.
- Layer dependency boundaries: Describe which dependencies the domain, handlers, and adapters are allowed or forbidden to have in the rules summarized here.
Why it matters: These boundaries define which imports the architecture checks should reject. - Executable dependency checks: Explain how configuration-based ArchUnit rules turn allowed package lists into build failures for forbidden dependencies.
Why it matters: A build failure makes a broken boundary visible before it becomes an accepted part of the codebase. - Existing violation freezing: Explain why freezing distinguishes existing architecture violations from new ones rather than accepting violations permanently.
Why it matters: The team can start enforcing boundaries even when the codebase is not yet free of violations.
Key terms: domain, shared kernel, handlers, adapters, dependency rules, checker class, configuration properties, ArchUnit rules, allowlist, freezing
7.3.1 The shared kernel boundary
This subsection defines the shared kernel’s dependency boundary and shows how a configured ArchUnit rule enforces it.
- Shared kernel dependency boundary: Explain which dependencies the shared kernel may have and why it is the architecture’s most restrictive layer.
Why it matters: This boundary keeps shared code from acquiring dependencies on the layers that use it. - Configured dependency rule pattern: Describe how the checker obtains its allowed libraries and expresses the dependency restriction.
Why it matters: Configuration can change the allowed dependencies without rewriting the checker. - Static test configuration workaround: Explain why the checker stores injected configuration in a static field and state the concurrency assumption behind that pattern.
Why it matters: The workaround makes the rule’s configuration available while making its initialization assumption explicit.
Key terms: shared kernel, JDK, utility libraries, YAML, allowed libraries, classes().that().resideInAnyPackage(...).should().onlyDepend, HexagonalArchitectureProperties, constructor injection, static @ArchTest, instance-based test methods
7.3.2 The domain boundary
Defines the domain checker’s permitted dependencies and the imports it rejects.
- Domain dependency boundary: Explain which packages the domain may depend on and how the checker catches imports that cross that boundary.
Why it matters: This rule makes an unwanted domain dependency visible as a test violation.
Key terms: domain checker, allowedPackages, shared kernel, domain boundary
7.3.3 The handler's wider scope
This section defines which dependencies handlers may have and how the architecture rule targets handler classes without also scanning commands and queries.
- Handler role in use cases: Explain that a handler is the concrete class implementing a @UseCase-annotated interface and orchestrating that use case.
Why it matters: Identifying the right class makes the dependency rule meaningful. - Handler dependency boundary: Describe the handler's broad allowed dependency set and explain why imports from adapters or web and persistence frameworks violate the rule.
Why it matters: The rule lets handlers orchestrate a use case without coupling them to infrastructure. - Handler package scan scope: Explain why the configured handler package pattern selects the application package itself rather than its command and query sub-packages.
Why it matters: The precise package pattern keeps the broader handler rule from applying to commands and queries.
Key terms: handler, @UseCase-annotated interface, handler dependency rule, onlyDependOnClassesThat, domain, input ports, output ports, commands and queries, handler package pattern, com.writeflow.application
7.3.4 The adapter inversion: No reaching into core
This section explains why adapter dependency checks use a denylist, what core dependencies they reject, and the persistence exception the rule must allow.
- Adapter dependency denylist: Explain why adapters use a denylist rather than the allowlists used for inner layers, and identify the core packages the checker protects.
Why it matters: This explains why the adapter rule is expressed differently from the rules for inner layers. - Ports versus core implementations: Describe the adapter dependencies this rule rejects and explain the explicit exception for persistence adapters.
Why it matters: The exception preserves a necessary repository contract without permitting adapters generally to reach into the core. - Protected package maintenance: Explain how to keep the adapter denylist effective when the core architecture gains another layer.
Why it matters: A passing architecture check is only meaningful if its protected set matches the current core.
Key terms: allowlist, denylist, domain, handlers, ports, command bus, DTOs, persistence adapter, repository interfaces, protected set
7.4 Annotation rules: The right stereotype in the right place
This section explains why stereotype annotations must match a class’s architectural role and package, even when a misplaced annotation compiles.
- Architectural stereotype placement: Explain how annotation rules protect architectural identity: each stereotype belongs to one layer, so rules forbid some annotations in certain packages and require specific annotations in others. Describe how marking a command as an @ApplicationService misidentifies it as a handler and affects component scanning and architecture tests.
Why it matters: A misplaced stereotype can silently change how the application and its architecture checks treat a class.
Key terms: annotation rules, stereotype annotations, @ApplicationService, Architecture Kernel, component scan, ArchUnit
7.4.1 Forbidden annotations
This subsection explains how architecture checkers use annotation denylists to keep layer stereotypes in their proper places, and why the shared kernel and adapters are exceptions.
- Layer annotation denylists: Explain how checkers forbid annotations from other layers and describe how to read the forbidden-annotation table.
Why it matters: These rules make misplaced layer stereotypes detectable by the architecture tests. - Shared kernel and adapter exceptions: Explain why the shared kernel and adapters have no forbidden-annotation rule here, and distinguish the adapter checker's responsibility.
Why it matters: A missing annotation restriction is intentional for these parts of the architecture, not a missing check.
Key terms: denylist, CommandChecker, QueryChecker, HandlerChecker, InputPortChecker, OutputPortChecker, shared kernel, adapters, dependency direction
7.4.2 Required annotations
This section specifies required annotations for ports and handlers and explains why adapters do not have a blanket annotation rule.
- Required port and handler stereotypes: State which annotations the architecture rules require on input ports, output ports, and handlers, and explain how required rules complement forbidden-annotation rules.
Why it matters: These rules make missing architectural roles detectable by the test suite. - Adapter annotation exception: Explain why @Adapter is not required on every adapter and what the AdapterChecker enforces instead.
Why it matters: It prevents a blanket rule from rejecting input adapters that their framework already discovers.
Key terms: required rules, @UseCase, @OutputPort, @ApplicationService, @Adapter, ApplicationAssembler, AdapterChecker, @RestController, @MessageListener
7.4.3 The domain's allowlist
Defines the domain layer’s annotation allowlist and explains why enforcing it requires a custom ArchUnit condition.
- Domain Annotation Allowlist: Explain that domain classes may use only the listed architectural annotations or no annotation, and that the allowlist works with forbidden- and required-annotation rules to catch misplaced stereotypes.
Why it matters: The rule catches a misplaced stereotype before code review. - Custom Allowlist Condition: Explain why the domain allowlist needs a custom ArchCondition and describe the implementation pattern stated here.
Why it matters: A custom condition lets the checker enforce a rule the fluent DSL cannot express. - Condition Event Reporting: Distinguish when a custom condition should emit both satisfied and violated events from when reporting only violations is sufficient.
Why it matters: Reporting both outcomes when needed keeps a custom condition useful when it is composed or inverted.
Key terms: domain layer, allowlist, @Repository, @DomainService, @ValueObject, @Identity, custom ArchCondition, ArchCondition<JavaClass>, check(), fluent DSL
7.5 Structural rules: Shape enforcement
This section defines what structural architecture rules check and distinguishes simple shape checks from checks that require custom conditions.
- Structural architecture contracts: Distinguish structural rules from dependency and annotation rules, and describe the class shapes they enforce for ports, commands, queries, and use cases.
Why it matters: These rules make architectural contracts checkable in the code’s actual class shapes. - Shape assertion tooling: Distinguish the simple shape assertions supported by the built-in fluent DSL from the more complex checks that require custom ArchCondition implementations.
Why it matters: The distinction helps identify when a built-in rule is enough and when a structural check needs a custom condition.
Key terms: structural rules, ports, marker interfaces, validateThenCreate, public default constructor, CommandHandler, Domain Specific Language (DSL), should().beInterfaces(), ArchCondition
7.5.1 Ports must be interfaces
This subsection explains why ports must be interfaces and how a structural rule enforces that requirement.
- Port interface requirement: Explain why input and output ports are interfaces and describe what the InputPortChecker and OutputPortChecker enforce.
Why it matters: The rule catches a design error that the Java compiler will not catch.
Key terms: input ports, output ports, interfaces, InputPortChecker, OutputPortChecker
7.5.2 Commands and queries must implement their marker
This section explains why commands and queries must implement their marker interfaces to be dispatched by their respective buses.
- Command and query markers: Explain that commands must implement Command and queries must implement Query because their respective buses rely on those types for dispatch.
Why it matters: The marker makes a command or query routable through its bus.
Key terms: Command marker interface, Query marker interface, command bus, query bus, dispatch
7.5.3 The validateThenCreate contract
This section explains why commands and queries need a validateThenCreate factory and how an architecture rule checks its method signature.
- Self-validating factory contract: Explain how validateThenCreate keeps commands valid at construction and reports failure through Either.
Why it matters: The factory makes validation part of creating a command rather than a separate step callers might miss. - Factory signature enforcement: Describe the method signature the architecture rule checks and why it needs a custom ArchCondition. State how the same check applies to queries.
Why it matters: A structural test can catch a missing or incorrectly typed factory before code relies on its contract.
Key terms: self-validating commands, validateThenCreate, Either<Error, T>, ArchCondition, Either, CommandChecker, QueryChecker
7.5.4 No public default constructor
This subsection explains why commands and queries must not have public default constructors and how an ArchUnit rule protects their validated construction contract.
- Validated construction contract: Explain why a public default constructor must be forbidden on commands and queries, and how this rule works with the validateThenCreate rule.
Why it matters: The factory cannot guarantee validated construction if callers have another public way to create the object.
Key terms: validateThenCreate, public default constructor, command, query, ArchUnit
7.5.5 Generic type validation on use cases
This section explains why use case interfaces need generic-type checks and how those checks complete their structural validation.
- Use case generic types: Explain why a command use case must use a Command as its command type argument and a query use case must use a Query as its query type argument, even when another type compiles.
Why it matters: A compiling use case signature can still violate the contract the bus relies on. - Input port structural checks: Describe how InputPortChecker checks a type at a specific generic-signature position and how that check fits with the other input-port rules.
Why it matters: The checks catch an invalid use case contract before anyone implements its handler.
Key terms: input ports, CommandHandler<E, C>, QueryHandler<E, R, Q>, Command, Query, InputPortChecker, custom condition, generic signature, beAssignableTo, @UseCase
7.6 Naming conventions: Making intent visible
This section explains how a handler naming rule makes use case implementations easy to find and how the rule is checked.
- Predictable use case handler names: Explain how to derive a handler class name from its @UseCase interface and why the convention helps developers navigate the codebase.
Why it matters: A predictable name lets developers find a use case’s handler without guessing. - Naming rule building blocks: Describe the two building blocks used to enforce the naming rule and why the interface-identifying predicate is reused.
Why it matters: Separating identification from the naming check lets the rules share the same handler-identification logic.
Key terms: HandlerChecker, @UseCase, Handler, DescribedPredicate, ArchCondition, @ApplicationService
7.7 Executing the rules: The test suite
The section explains that architecture checkers need test classes to execute their rules.
- Checker execution requirements: Explain why the architecture checkers need test classes and what each test class must do to evaluate its rules.
Why it matters: Defining an architecture rule does not enforce it until a test runs the checker.
Key terms: checkers, test class, Spring context, configuration properties, ArchUnit, rule evaluation
7.7.1 The test class pattern
This section shows the shared wiring pattern for architectural test classes and how their scan scope and checker vary.
- Architectural test class pattern: Describe the common structure of an architectural test class and explain what changes between checker tests. Distinguish the test class’s wiring role from the checker’s rule logic.
Why it matters: The pattern lets each architectural test select what to scan and which checker to run without putting rule logic in the test class.
Key terms: @AnalyzeClasses, TestConfig, checker, ArchUnit, SharedKernelArchitectureTest
7.7.2 WriteFlow's complete test inventory
This section shows how WriteFlow wires eight architectural test classes to checkers and runs them individually or as a suite.
- Architectural test class wiring: Explain how WriteFlow's eight architectural test classes connect checkers to the packages they inspect.
Why it matters: Keeping rules in checkers lets test classes focus on choosing where those rules apply. - Architectural test execution options: Describe how developers and CI run WriteFlow's architectural tests.
Why it matters: Developers can check one layer quickly while CI checks the full set on every push.
Key terms: architectural test classes, checker, package scope, pure wiring, mvn test, spring-boot-assembly module, CI
7.8 Living with violations: The freeze mechanism
Explains how ArchUnit’s freeze mechanism lets a team enforce architectural rules against new violations while gradually eliminating existing ones.
- Frozen violation baseline: Explain why freezing a rule helps an existing codebase adopt architectural checks and how later runs distinguish known violations from new ones.
Why it matters: The team can stop architectural drift without first fixing every legacy violation. - Freeze store integrity: Describe what the freeze store records, which settings let it operate, and why it must be committed to version control.
Why it matters: Preserving the baseline keeps incremental enforcement from being accidentally reset. - Graduation to strict enforcement: Explain how a frozen rule becomes a directly enforced rule as existing violations are fixed.
Why it matters: The baseline is a path to strict enforcement, not permission to retain violations indefinitely.
Key terms: freeze mechanism, FreezingArchRule.freeze(), known violations, archunit_store/, archunit.properties, allowStoreCreation, allowStoreUpdate, freeze store, strict enforcement
7.9 Summary
Where this is used later
- Reusing the chapter 7 checker library (chapter 9) · The implementation reuses the chapter 7 checker library.
- Assembly: The composition root (chapter 9) · Applies assembly when connecting the complete WriteFlow application.
- Extending the library with a project-specific rule (chapter 9) · Extending architecture checks for project-specific rules requires keeping their boundaries aligned with the architecture.
- What not to test (chapter 8) · Structural rules can check whether annotations are present.
- From shape to behavior (chapter 8) · Structural rules establish consistent artifact shapes.
- (chapter intro) (chapter 8) · The execution of ArchUnit rules that check WriteFlow’s structural form.
- The persistence adapter (chapter 9) · Architecture checks as enforceable rules
Concepts explained in this chapter
- architectural test freezingA mechanism that records existing architectural rule violations so they can be tolerated while new violations remain disallowed.
- architectural testingArchitectural testing automatically checks whether a codebase conforms to specified structural and dependency rules.
- ArchUnitArchUnit is a Java library for expressing and testing architectural constraints in code.
- architectural ruleAn architectural rule is a constraint that specifies an allowed or required structural property of a software system.
- moduleA module is a cohesive software unit whose implementation and dependencies are organized behind a defined boundary.
- dependency directionA constraint specifying which software components or layers are permitted to depend on one another.
- handlerA handler is an application component that processes a request and coordinates the interactions needed to fulfill it.
- commandA command object encapsulates data representing a requested application operation.
- validatethencreateA construction pattern that validates all required constraints before creating an object and returns validation errors instead of an invalid object.
- outbound portAn application-facing boundary that declares a service the application requires from an external system.
- primary portAn interface exposing an application operation that an external caller can invoke.
- queryA query is a request that retrieves information without changing application or domain state.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
