Remote / An event-sourced domain behind Remote

Three ways a Command meets a declared write

  • Lower a declared write (Lower.write). The declaration runs inside the Aggregate's decide, and the page predicts from that same declaration. Use it when the write fits one Aggregate and you want the rules stated once.
  • Bind a Command you wrote (DomainRemote.command). Your decide rules. If the page's mutation is a Mutation.write, the page predicts from a second statement of the rules, which Law.check compares with the first. Use it when the model already exists, or decide does more than a declared write.
  • Import a Command (Imported.mutation). Your decide rules, and the page predicts nothing: the mutation carries only a footprint of the fields it touches. Use it when the page only needs to send the Command.

The rest of this guide lowers one write, because that is where the declared domain and the Domain model meet most closely.