Skip to Content
What Is Domain-Driven Design?
book

What Is Domain-Driven Design?

by Vladik Khononov
October 2019
Intermediate to advanced content levelIntermediate to advanced
98 pages
1h 49m
English
O'Reilly Media, Inc.
Audiobook available
Content preview from What Is Domain-Driven Design?

Chapter 7. Integration of Bounded Contexts

In Chapter 5, you read about domain-driven design’s patterns for defining integrations between bounded contexts. In this chapter, we’ll talk briefly about those patterns from a tactical design perspective.

Partnership and Shared Kernel

Both the partnership and shared kernel patterns require well-established communication between teams and as many synchronization opportunities as possible. Therefore, it’s crucial to invest in an integration test suite that will verify the integrations between the bounded contexts. It’s also essential to set up a continuous integration pipeline that will execute those tests continuously and provide fast feedback about the committed changes.

Anticorruption Layer

This pattern protects the downstream context from the inconvenient model exposed by the upstream context. It translates the service’s provider’s model into a model driven by the consumer’s needs. Such translation can be implemented in different ways:

Local cache

The downstream consumer can implement a job that fetches data from the upstream service, transforms it, and stores the result in a local cache. If needed, this cache can be wiped and regenerated from scratch.

This approach is very similar to the implementation of projections in the CQRS architecture.

Adapter service

The downstream consumer can proxy all requests to the upstream service through a custom service. The adapter will call the upstream context, transform the result, and ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Implementing Domain-Driven Design

Implementing Domain-Driven Design

Vaughn Vernon

Publisher Resources

ISBN: 9781492057802