Contexts as a single deployment unit. Easy to refactor Easy to test the overall system Likely to degrade unless explicitly managed Harder to test individual Bounded Contexts
deployment artifact. Often parts of the context are even deployed as separate processes. ◦ Bounded Context interaction is remote ◦ Testing individual modules Hard to refactor context boundaries Hard to test the overall system
as possible required. Advanced customizations might need additional information. 2. Test support Individual modules should be testable standalone. 3. Minimize distance to development workflow Feedback about architecture violations as fast as possible.
Packages directly nested underneath the main application package are considered context ones. 2. Simple set of access rules and API to verify Only access components in module API packages.
Packages directly nested underneath the main application package are considered context ones. 2. Simple set of access rules and API to verify Only access components in module API packages. 3. Test support to bootstrap modules Integration with Spring test context framework and Spring Boot integration test support to limit bootstrap (component & entity scanning) to only the involved packages.
and entities of other modules. 2. Component dependency References to other Spring beans, required to bootstrap the module 3. Events & event listeners Dependency on some other module’s event type. Interesting as they’re great hooks for testing. #☝Avoid!
is contained in. Components in other modules the bootstrapped module depends on need to be provided through @MockBean. 2. Direct dependencies Bootstraps the module including the modules it directly depends on. Transitive dependencies have to be mocked just like in standalone mode. 3. All dependencies Bootstraps the entire sub-tree of modules starting from the current one.
Packages directly nested underneath the main application package are considered context ones. 2. Simple set of access rules and API to verify Only access components in module API packages. 3. Test support to bootstrap modules Integration with Spring test context framework and Spring Boot integration test support to limit bootstrap (component & entity scanning) to only the involved packages. 4. Documentation support PlantUML integration via Simon Brown’s Structurizr to document module structure and dependency types.
artifact. Dedicated control over dependencies Test scope is defined by the artifact Potential explosion of number of artifacts Internal structure visible to the outside
Packages directly nested underneath the main application package are considered context ones. 2. Simple set of access rules and API to verify Only access components in module API packages. 3. Test support to bootstrap modules Integration with Spring test context framework and Spring Boot integration test support to limit bootstrap (component & entity scanning) to only the involved packages. 4. Documentation support PlantUML integration via Simon Brown’s Structurizr to document module structure and dependency types.