Skip to content

Finding aggregate (root) and naming (factory) methods #1

@webdevilopers

Description

@webdevilopers

What really interests me is defining the actual aggregate root from the Order POV.

In my current company I have to processes:

  • Customer talks to Employee. Employee logs in, creates an offer, sends it to Customer
  • Customer receives Offer, agrees, informs Employee
  • Employee logs in, enters the final order. Generates an Order Confirmation and sends it to the Customer
  • Customer confirms order
  • Employee logs in - an actual "Contract" is created. Work can begin.

Regarding the Offer and Order it is the Employee with the active part. In the red book there is this example "Table 1.5 Analyzing the best model for the business.":
http://www.informit.com/articles/article.aspx?p=1944876&seqNum=3

Now I started thinking that it should be something like:

  • Employee->sendOfferToCustomer
  • Employee->sendOrderToCustomer
  • Customer->confirmOffer

or at least:

  • Customer->receiveOffer
  • Customer->receiveOrder
  • Customer->confirmOffer

instead of:

  • Customer->requestOffer
  • Customer->placeOrder
  • Customer->confirmOffer

This really confused me! ;) My feeling as a developer tells me to use the last approach.
What do you think @yvoyer ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions