My question is related to defining aggregate boundaries and the use of repositories (see Cargo example in DDD pp 170-178). In Eric's example, he defines Cargo...
In my (highly JDO-biased) way of thinking, a Repository represents more-or-less the persistent store in which the domain objects are stored. This need not be a...
Actually, I thought Eric's point about aggregate roots / repositories in the book was that mapping aggregate boundaries to your repository boundaries was a...
... I've had more success doing component-level partitioning at the Repository level, but allowing multiple aggregate roots within a given Repository. Consider...
Patrick, Couldn't you have three repositories, TradeRepository, TraderRepository, and CompanyRepository? One for each aggregate root? If I understand Eric's...
Patrick, Just out of curiosity, what's a 'Leg'? (I don't know anything about financial services.) Steve ... From: Molitor, Stephen L Sent: Monday, May 03,...
You could, but then we get back to the beginning of the thread: Do you allow trade.getLegs().iterator().next().getTrader(), or do you instead require some...
A Leg is something that a Trade has many of ;) In more precise terms, a Trade might consist of a number of distinct operations. For example, I might agree to...
Patrick, OK, I went out to my car to get my copy of the book. Thanks for your detailed replies; this has helped clarify some things for me. First off, I was...
... ROTFL. Me neither. ... Yes -- I think that given arbitrary relations to classes outside the repository, we're in sync in what we're getting at. Also, I...
... Well I figured you weren't. But I didn't want to get dinged by all the harpies out there. ;) ... Right. Although I would qualify 'arbitrary relations' to...
... Personally, I like breaking the rules with Repository a bit and having a Trading repository that does the various trading-related things, rather than...
... messages, ... traverse ... Great discussion guys. I've enjoyed monitoring the dialogue and pleased that I sparked a vibrant discussion. Thanks for...
Patrick, I guess you could look at the mega-repository as, logically at least, a facade over several smaller, per aggregate root repositories. To group ...
Thanks for the great info everyone. Sorry it has taken me so long to respond. I want to throw another twist into the mix. In the health care domain they...
Actually, I think this discussion has helped me with respect to the deep object graphs. It looks like it may be possible to establish more fine grained...
Patrick, I'd like to run something by you. First, let me say I've really enjoyed this discussion and the back and forth has been of the highest quality....
My repositories are always interfaces since I always mock them for testing. You're right, the implementation doesn't really matter - for what it's worth,...
Scott, This is Steve, not Patrick. I'm butting in. ;) Sure, you could do that. In fact, my repositories are interfaces; the implementation doesn't matter. I...
In our project we have a Repository per aggregate root, and an abstract Store that they all hang off of (which sounds like your coarse-grained repository)....
Hi.... Great answer, I think that would work very well :) Thanks (I'll follow that approach). I was just trying to be ultra-anticipative considering lack of...
... The mutator may not have enough information to decide whether to save or not. By "method which modifies" do you mean the nutator itself or code that calls...
... save or ... By "method which modifies" I mean code that calls the mutator. ... other ... list. ... This list of unsaved instances... should I make it...
Hi, I'm confused whenever I have to decide whether to put claim processing behavior in Claim object (claim.process()) or in ClaimProcessingService object...
Raka, I think you need to consider some form of Unit of Work if your model is going to be doing something against objects - assuming there is some complexity...
Hi, I think I see a shed of light here... Page 106: "When a _significant_ process or transformation in the domain is not a natural responsibility of an ENTITY...
Claim processing should go in a service. I know this because the smart people I know in insurance do it this way. But I think I can also explain why they do it...
Hi, I have a model like this: Policy--(1)--(*)-->FinancialInfoModification I need to make a decision whether or not to put FinancialInfoModification inside...
... Raka, I dont have Erics book to hand, but I do remember Eric stating that a single aggregate root could internally have an object within the graph that is ...