Blog Logo
TAGS

Domain-Driven Refactoring: Extracting Domain Services

In this post, Jimmy Bogard discusses the process of domain-driven refactoring as a means of arriving at a domain-driven design. He starts by explaining the model building blocks of domain-driven design, which include entities, aggregates, services, factories, and more. The post then dives into one specific refactoring technique - extracting domain services - and walks through the process of extracting a problematic method that uses an external web API to calculate the value of an offer. Jimmy demonstrates how to use various refactoring techniques to encapsulate this web API into a service, ultimately leading to a more testable codebase. This post is a part of a series discussing domain-driven refactoring, and is aimed at software developers looking to improve their understanding of domain-driven design and how to apply it in practice.