Bounded Contexts
For Legacy Code
Bounded Context
“a semantic contextual boundary”

— Domain-Driven Design Distilled byVaughnVernon



A meaningful collection of components that meets a
defined, limited, and useful purpose with defined
interfaces and means of interaction with external
actors.
Legacy Code
“source code inherited from someone
else”

— Legacy Code,Wikipedia



Code that because of its lack of tests, poor design, or
other factors is difficult to work with.
Goals
Maintain Functional State

AddValue & Reduce Debt

Permit Changeability
Resources
Resources
The Project
The Problems
The Approach
Account
User
Project
Story
Account
User
Project
Story
Account
User
Project
Existing System 3rd Party
Account
User
Project
Story
Account
User
Project
Existing System 3rd Party
AntiCorruptionLayer
AntiCorruption Layer
Web-hooks
Commands &
Queries
Account
User
Project
Story
Account
User
Project
Existing System 3rd Party
AntiCorruptionLayer
Mapping
Account
User
Project
Story
Existing System 3rd Party
AntiCorruptionLayer
Mapping
Account
User
Project
Proofs
Revisions
Proofs
Account
User
Project
Story
Existing System 3rd Party
AntiCorruptionLayer
Mapping
Account
User
Project
Proofs
Revisions
Proofs
Create Proof
Add Revision
Delete Proof
…
Recap
Difficulties
Achievements
Questions
James Thompson
Staff Software Engineer @ Nav
@plainprogrammer
theplainprogrammer.com

Bounded Contexts for Legacy Code