Code Structure Within a Bounded Context

Now let’s look at how the code is structured within a bounded context.

In a traditional “layered approach,” the code is divided into layers: a core domain or business logic layer, a database layer, a services layer, and an API or user interface layer (or some variant of these). A workflow will start at the top layer, work its way down to the database layer, and then return back to the top as shown in the figure.

images/arch-layers.png
images/arch-vertical-slices.png

This approach has many problems, however. One particular issue is that it breaks the important ...

Get Domain Modeling Made Functional now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.