January 2018
Beginner to intermediate
312 pages
7h 22m
English
Let’s review the domain model that we created previously:
| | context: Order-Taking |
| | |
| | // ---------------------- |
| | // Simple types |
| | // ---------------------- |
| | |
| | // Product codes |
| | data ProductCode = WidgetCode OR GizmoCode |
| | data WidgetCode = string starting with "W" then 4 digits |
| | data GizmoCode = ... |
| | // Order Quantity |
| | data OrderQuantity = UnitQuantity OR KilogramQuantity |
| | data UnitQuantity = ... |
| | data KilogramQuantity = ... |
| | |
| | // ---------------------- |
| | // Order life cycle |
| | // ---------------------- |
| | |
| | // ----- unvalidated state ----- |
| | data UnvalidatedOrder = |
| | UnvalidatedCustomerInfo |
| | AND UnvalidatedShippingAddress |
| | AND UnvalidatedBillingAddress |
| | AND list of UnvalidatedOrderLine |
| | |
| | data UnvalidatedOrderLine = |
| |
Read now
Unlock full access