Representing Complexity in Our Domain Model

As we have drilled down into this one workflow, the domain model has become a lot more complicated. That’s good. Better to spend time on understanding complexity now rather than later, when we are in the middle of coding. “A few weeks of programming can save you hours of planning,” as they say.

Here’s a diagram of the workflow now:

images/order-state.png

But this diagram doesn’t reflect everything that we’ve learned. Let’s see if we can do better and capture all this new information in our text-based language.

Representing Constraints

We’ll start with the most primitive values first: the product codes and quantities, which ...

Get Domain Modeling Made Functional 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.