Domain-driven design presents a set of architecture tenets in the form of strategic and tactical design elements. This enables you to decompose large, potentially unwieldy business subdomains into well-factored, independent bounded contexts.
One of the great advantages of DDD is that it does not require the use of any specific architecture. However, the software industry has been using a plethora of architecture styles over the last few years. Let’s look at how DDD can be used in conjunction with a set of popular architecture styles to arrive at better solutions.
Layered architecture is one of the most common architecture styles, where the solution is typically organized into four broad categories: presentation, application, domain, and persistence. Each of the layers provides a solution to a particular concern it represents, as shown here:
Figure 2.1 – The essence of layered architecture