Slide 1

Slide 1 text

DDD Strategic Design With Spring Boot Michael Plöd - innoQ
 @bitboss Confidential
 (no it’s not a pet shop)

Slide 2

Slide 2 text

Michael Plöd - innoQ
 @bitboss The Spring Boot / code part of this presentation can be found at:
 https://github.com/mploed/ddd-strategic-design-spring-boot

Slide 3

Slide 3 text

Disclaimer Michael Plöd - innoQ
 @bitboss Most of these ideas do not come from me personally. I have to thank Eric Evans for all the inspiration / ideas. If you haven’t: go out and get his amazing book: Domain Driven Design.

Slide 4

Slide 4 text

Domain Driven Design Strategic Design (Internal) 
 Building Blocks Large Scale
 Structure Destillation

Slide 5

Slide 5 text

Strategic Design Strategic Design consists of Bounded Context Context Map Shared Kernel Customer / 
 Supplier Conformist Anticorruption
 Layer Separate Ways Open / Host 
 Service Published 
 Language

Slide 6

Slide 6 text

Strategic
 Design Bounded Context Every sophisticated business domain consists of a bunch 
 of Bounded Contexts Each Bounded Context contains models and maybe other contexts The Bounded Context is also a boundary for the meaning of a given model

Slide 7

Slide 7 text

Strategic
 Design Bounded Context Example Reservations Event
 Management Badges Customer Name Payment Details Adress Company Session Registrations Lunch Preferences Name Job Description Twitter Handle

Slide 8

Slide 8 text

Strategic
 Design Bounded Context Example Reservations Event
 Management Badges Name Payment Details Adress Company Session Registrations Lunch Preferences Name Job Description Twitter Handle Each Bounded Context has its own model of a customer This is a major enabler for independent Microservices Take a look at the name of the customer? Maybe we want some shared data?

Slide 9

Slide 9 text

Strategic Design Strategic Design consists of Bounded Context Context Map Shared Kernel Customer / 
 Supplier Conformist Anticorruption
 Layer Separate Ways Open / Host 
 Service Published 
 Language

Slide 10

Slide 10 text

Context Map Strategic
 Design The Bounded Context by itself does not deliver an overview of the system By introducing a Context Map we describe the contact between models / contexts The Context Map is also a great starting point for future transformations

Slide 11

Slide 11 text

Strategic
 Design Context Map - Patterns Shared Kernel Customer / 
 Supplier Conformist Anticorruption
 Layer Separate Ways Open / Host 
 Service Published 
 Language

Slide 12

Slide 12 text

Strategic
 Design Context Map - Patterns Shared Kernel Customer / Supplier Conformist Anticorruption Layer Separate Ways Open / Host Service Published Language Two teams share a subset of the domain model including code and maybe the database. The shared kernel is often refered to as the core domain.

Slide 13

Slide 13 text

Strategic
 Design Context Map - Patterns Shared Kernel Customer / Supplier Conformist Anticorruption Layer Separate Ways Open / Host Service Published Language There is a customer / supplier relation ship between two teams. The downstream team is considered to be the customer, sometimes with veto rights.

Slide 14

Slide 14 text

Strategic
 Design Context Map - Patterns Shared Kernel Customer / Supplier Conformist Anticorruption Layer Separate Ways Open / Host Service Published Language The downstream team conforms to the model of the upstream team. There is no translation of models and no vetoing. If the upstream model is a mess, it propagates to the downstream model.

Slide 15

Slide 15 text

Strategic
 Design Context Map - Patterns Shared Kernel Customer / Supplier Conformist Anticorruption Layer Separate Ways Open / Host Service Published Language The anticorruption layer is a layer that isolates a client’s model from another system’s model by translation.

Slide 16

Slide 16 text

Strategic
 Design Context Map - Patterns Shared Kernel Customer / Supplier Conformist Anticorruption Layer Separate Ways Open / Host Service Published Language There is no connection between the bounded contexts of a system. This allows teams to find their own solutions in their domain.

Slide 17

Slide 17 text

Strategic
 Design Context Map - Patterns Shared Kernel Customer / Supplier Conformist Anticorruption Layer Separate Ways Open / Host Service Published Language Each Bounded Context offers a defined set of services that expose functionality for other systems. Any downstream system can then implement their own integration. This is especially useful for integration requirements with many other systems.

Slide 18

Slide 18 text

Strategic
 Design Context Map - Patterns Shared Kernel Customer / Supplier Conformist Anticorruption Layer Separate Ways Open / Host Service Published Language Published Language is quite similar to Open / Host Service. However it goes as far as to model a Domain as a common language between bounded contexts.

Slide 19

Slide 19 text

Strategic
 Design Context Map - Why? Credit
 Application Credit
 Decision Scoring Credit
 Agency CRM Currently we only see call stacks

Slide 20

Slide 20 text

Strategic
 Design Context Map Credit
 Application Credit
 Decision Scoring Credit
 Agency CRM U D D D D U U U C
 F O
 H
 S C
 U
 S O
 H
 S O H S A C L S K S K

Slide 21

Slide 21 text

Strategic
 Design Example Spring Boot App https://github.com/mploed/ddd-strategic-design-spring-boot

Slide 22

Slide 22 text

THANK YOU! <3 Michael Plöd - innoQ
 @bitboss Contact me for DDD Trainings / Consulting