Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Could you perhaps share an actual code example of the Account class? I don't see why the Account should have a method to add a transaction. Based on the business rules, Users may add transactions to accounts they have access to, it's a User who adds a Transaction into an Account, not an Account adding the Transaction by itself. Following the rule of ubiquitous language, shouldn't the methods be on a User aggregate by definition? Commented Feb 13, 2018 at 15:04
  • @DavidPacker It matters how you define objects. A user that has accounts that have transactions means everything has to go through user first. An account that has transactions and has valid users makes the intent far easier to understand. The important interaction is usually between the transaction and the account so that's where the abstraction should focus. forcing everything through user just adds noise. Commented Feb 13, 2018 at 20:00