Re: Re: Populating new aggregates
"Caleb Cushing [email protected] [domaindrivendesign]" <[email protected]> Fri, 04 Sep 2015 12:20:14 +0000
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAAHKNREiqer=cKWsgcfRaHx4c8yScn7tUJqRp+Kr9eZygHn=tw@mail.gmail.com> |
On Fri, Sep 4, 2015 at 7:44 AM Greg Young [email protected] [domaindrivendesign] <[email protected]> wrote: > "1. Any model that allows you to save your work as a draft, this means > that you need to be able to save the work as incomplete. You might be able > to save all the fields in this case, but they might not be valid." > > Introduce a draft object with a method Complete which returns the actual > aggregate. > So in one of the projects I've worked on, we had a concept of a Lab Test, the Test had about 10 Rich Text Fields, several Categories, and numerous other field types over a Page workflow. You could save the Lab Test at any time before it was complete in Draft Status. We could make a Draft object, and I won't argue that they way it was coded was great, but given the size of the incompleteness the number of Draft objects required to have each stage complete would be something like 30. One Draft object might be a better representation, but it's still incomplete at points. Am I missing something? -- Caleb Cushing http://xenoterracide.com