Wrapping Up
In this chapter, we learned how to use the F# type system to model the domain using simple types, record types, and choice types. Throughout, we used the ubiquitous language of the domain, such as ProductCode and OrderQuantity, rather than developer-centric words such as string and int. Not once did we define a Manager or Handler type!
We also learned about different kinds of identity and how to model the DDD concepts of Value Object and Entity using types. And we were introduced to the concept of an “aggregate” as a way to ensure consistency.
We then created a set of types that looked very similar to the textual documentation at the beginning of this chapter. The big difference is that all these type definitions are compilable ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access