Skip to Content
Domain-Driven Transformation
book

Domain-Driven Transformation

by Carola Lilienthal, Henning Schwentner
November 2025
Intermediate to advanced
464 pages
11h 25m
English
O'Reilly Media, Inc.
Book available
Content preview from Domain-Driven Transformation

Chapter 8. Strengthening the Source Code with Domain Knowledge

Once the system has been technically stabilized, we can turn to tactical Domain-Driven Transformation. This involves strengthening our legacy software with domain knowledge. Of course, there is domain knowledge in all legacy software, but it is often hidden under a lot of technology and is inconsistent.

This chapter shows different measures, how to free domain knowledge from technology and inconsistency, and how to make it more explicit, and thus bring it to light. We also discuss which domain-driven refactorings (which are for easier reference described in the appendices) can support these measures.

In Chapter 5 we discussed two basic principles of modular architecture: cohesion and coupling. With the help of these two criteria, the measures for strengthening the source code with domain knowledge can be well located. Together with two higher-level measures, this results in the following classification:

  • Separate business and technical source code

  • Increase cohesion

    • Enrich modeling with domain knowledge

    • Utilize value objects

    • Introduce domain-oriented preconditions

    • Make domain identity of entities explicit

  • Reduce coupling

    • Introduce ID references at aggregate boundaries

    • Reduce inheritance in business source code

    • Use domain events for decoupling

  • Document and check architecture in code

All these measures of strengthening the source code with domain knowledge lead us to refactor the source code. ...

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

LLMOps

LLMOps

Abi Aryan
Domain-Driven Refactoring

Domain-Driven Refactoring

Alessandro Colla, Alberto Acerbis

Publisher Resources

ISBN: 9798341640108Errata Page