Subdomains and Bounded Contexts at Work

Here’s a fairly simple example to introduce how Subdomains can be used. Think of a retail company that sells products online. The products it sells could be just about anything, so we won’t think too carefully about them. To do business in this Domain, the company must present a catalog of products to shoppers, it must allow orders to be placed, it must collect payment for the products sold, and it must ship the products to buyers. This online retailer’s Domain seems to be composed of these four primary Subdomains: Product Catalog, Orders, Invoicing, and Shipping. The upper part of Figure 2.1 shows the e-Commerce System.

Figure 2.1. A Domain with Subdomains and Bounded Contexts

This all seems quite straightforward, ...

Get Implementing Domain-Driven Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.