The Eric Normand Podcast

Is deferring decisions about our domain a good idea?

Nov 21, 2022
The discussion dives into the tricky balance of domain rules and business rules. Using a pizza ordering analogy, it highlights how important it is to differentiate between the two. Simplifying your domain model can lead to greater adaptability. Delegating business decisions to the appropriate layer is key for streamlined processes. This creates a more effective and manageable system, much like creating the perfect pizza without getting bogged down in too many toppings.
Ask episode
AI Snips
Chapters
Books
Transcript
Episode notes
ANECDOTE

Pizza Toppings Example

  • Eric Normand shares an example with a pizza system allowing unlimited toppings.
  • The domain allows a thousand toppings but the business restricts to three.
INSIGHT

Domain vs Business Rules

  • The limit on pizza toppings is a business rule, not a domain rule.
  • Domain models the pizza, business defines the specific limits based on shop preferences.
INSIGHT

Business-Specific Rules

  • Different businesses can have varying topping limits using the same pizza domain model.
  • This shows why the limit belongs in the business layer, not the domain layer.
Get the Snipd Podcast app to discover more snips from this episode
Get the app