Transcript
Page 1: DDD Basics - Context mapping

Stijn Volders

@ONE75

http://blog.one75.be

Page 2: DDD Basics - Context mapping

Context MappingWhy a Context Map is essential for the success of your project

domaindriven.be – DDD Basics

Page 3: DDD Basics - Context mapping

What

• A simple diagram with Bounded Context’s who are involved in your project an your relation with them

Page 4: DDD Basics - Context mapping

Why

• Get insight in inter-team communication an their bandwith

• Measure to which extent a vision could be shared

• Help to decide if DDD is appropriate

Page 5: DDD Basics - Context mapping
Page 6: DDD Basics - Context mapping

It’s all about relations

Page 7: DDD Basics - Context mapping

Relations fall into Patterns

• Partnership

• Customer/Supplier

• Big Ball of Mud

• Conformist

• Shared Kernel

• Separate Ways

Page 8: DDD Basics - Context mapping

All relations have their price

Page 9: DDD Basics - Context mapping
Page 10: DDD Basics - Context mapping

Definition: Partnership

When teams in 2 contexts succeed or fail together

• Co-ordintad planning of development and joint management of integration

• Interdependent features should be scheduled so that they are completed for the same release

Page 11: DDD Basics - Context mapping

Definition: Customer - Supplier

• 2 teams in an upstream/downstream relationship

• Upstream can succeed interdependently of the downstream team

• Downstream priorities factor into upstream planning

Page 12: DDD Basics - Context mapping

Definition: Big Ball of Mud

When you have to deal with a big, monolithic (legacy) system

• Often with large intermixed models

Page 13: DDD Basics - Context mapping

Definition: Conformist

• 2 teams in an upstream/downstream relationship

• Upstream has no motivation to provide for the downstream team’s needs

• Downstream team doesn’t put effort in translation

Page 14: DDD Basics - Context mapping

Definition: Shared Kernel

Sharing a part of the model

• Very intimite interdependency

• Can leverage or undermine design work

• Must be kept small!

Page 15: DDD Basics - Context mapping

Definition: Separate Ways

Used to cut loose systems

• Integration is always expensive

• When there is little to zero interest/benefit in integration

Page 16: DDD Basics - Context mapping

Definition: Anticorruption Layer

• Isolating layer to limit impact of changes in an upstream system

• Requires little or no modification to the upstream system

• Translates in both directions between the 2 models

Page 17: DDD Basics - Context mapping

Definition: Open Host Service

When you want to open your system for integration

• Protocol that gives access to your system as a set of services

• Open for everyone that needs to integrate with your system

• New services can be added on request but need to serve a “general” purpose

Page 18: DDD Basics - Context mapping

Definition: Published Language

When you want a common language for translation between 2 bounded contexts

• Often combined with Open Host Service

Page 19: DDD Basics - Context mapping

Upstream/Downstream

Page 20: DDD Basics - Context mapping

Upstream/Downstream

• Not about the direction of the data!

• Upstream will influence downstream

• Might be technical (code)

• But also: schedule, responsiveness to external requests...

Page 21: DDD Basics - Context mapping

Attention!

• Map the current situation, not the (desired) future

• If it’s a mess, show it. It’ll bring focus to the problems & risks involved in your project.

Page 22: DDD Basics - Context mapping

Let’s try it!

Page 23: DDD Basics - Context mapping

Domain: Amazon

Page 24: DDD Basics - Context mapping

Step 1

• Draw each Context with the name (as known in the UL)

Page 25: DDD Basics - Context mapping

Step 2

• Define which models communicate• Bandwith

Page 26: DDD Basics - Context mapping

Step 3

• Indicate the direction of the relation, if applicable (Upstream/Downstream)

Page 27: DDD Basics - Context mapping

Step 4

• Put the name of the Pattern on the relationship• Partnership

• Customer/Supplier

• Conformist

• Separate Ways

• Big Ball of Mud

• Shared Kernel

Page 28: DDD Basics - Context mapping

Step 5

• Indicate which BC’s have explicit translation or sharing• Anti Corruption Layer

• Open Host/Published Language

Page 29: DDD Basics - Context mapping

Questions?

Stijn Volders

@ONE75

http://blog.one75.be


Top Related