Re: Re: Conceptual Vs Data Vs Domain model
"Paul Rayner [email protected] [domaindrivendesign]" <[email protected]> Sat, 6 Dec 2014 21:18:43 -0700
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAKKp0qiSEFZ1Lu1s7JZKi07spuY+ygek2X4JMF9nOrwH05Ha6w@mail.gmail.com> |
Two bounded contexts typically means two models, each with their own ubiquitous language and each addressing a different set of business scenarios. Keep that in mind. If they share the same language and conceptual model then it's more likely to be one bounded context, with perhaps multiple modules or some other organizing structure. This is still all too abstract for me. Either model could still work. I'd be asking questions like: How many catalogs will you have? Why do you need to separate products that way? How many products? How many categories? Which things change often? If you removed a catalog, would you remove all the products as well, or do they exist conceptually independent of the catalog? Which of the features you list are likely to be the most critical to the application? Etc. The way you've presented it now, your catalog context operations could easily be done purely in a relational database. Why do you even need a domain model there? Forecasting context seems kinda trivial too, but different tax and sales price strategies could be challenging. I suppose you are just giving us a simplified example, which also contributes to why this is hard to advise you on which way to go. What I would do if I was working with someone at this point is create some real business examples to talk and walk through, then write some code & tests, or pseudocode, to try out the model. I realize this probably doesn't help you much, but it's how I'd approach it. See http://domainlanguage.com/ddd/whirlpool/. Paul. On Sat, Dec 6, 2014 at 4:14 PM, [email protected] [domaindrivendesign] <[email protected]> wrote: > > > Thank you Paul for quickly responding. > > > You can consider this in a Catalog and Forecasting Bounded Context. Some > DSL are: > > > Catalog BC: > > > 1. Categorize all the products received today at the warehouse based on > the vendor and UPC. > > 2. Remove expired products. > > > Forecasting BC: > > > 1. Find potential sales tax for states (like CA, UT, CO etc...) > > 2. Find profit for products in Category A > > 3. Find profit for products in Category A,B & D > > 4. Calculate sales price by using five different strategies > > > I appreciate your response. > > ---In [email protected], <paul@...> wrote : > > Either model could work in the abstract, but how do you want to use your > model? Give some concrete examples of what behaviors you're looking to > support and then it will be easier to advise you. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > class Catalog > > { > > List<Category> Categories; > > } > > > class Category > > { > > List<Product> products; > > } > > > class Product > > { > > } > > > > >