Sorry for coming to this so late but I've been considering this issue and find this discussion very interesting. I'm not sure if I see the aggregate pattern is...
Just read the link, very interesting...particularly the bit where Eric says: "For example, you could invoke the root's validation method(s) each time you...
That makes sense to me. So, the application layer would leverage the repositories to get whatever would be necessary to create the aggregate, pass it to the...
Hi, I agree fully since strongly typed code (with objects instead of just primary keys in argument lists) has one advantage; it will fail when you compile and...
Hello, Yes, DDD puts the first M in MMVC <http://c2.com/cgi/wiki?ModelModelViewController> . But even in the Jacobsonian interpretation (see What's a...
Domain experts know the domain – from a business perspective. When doing an implementation of a domain, you have to master concepts like “entity or value...
Since the person writing the domain model must know the domain – that person must have direct access to and excellent communication with the domain experts....
DDD has been an incredible force for good, truth and beauty in my experience. However, I have a problem with the handling of aggregates. The way they are...
Hi DDDers, I am also planning to use DDD and the Repository pattern in my design. I have been googling and reading a lot of material on Domain Driven Design. I...
Thank for that Colin. No suppose I wanted to add stock control to the application. The HTTP post now contains a product id and quantity. This id will be used...
Hi Tomas, Thanks for your thoughts. I'm glad we think alike on this subject. Yes, it will be a challenge to find the best partitioning boundaries (it always...
I may be getting the wrong end of the stick here but I think what you're saying is that the process will be: 1) User requests that the product be added to her...
I do consider the aggregate pattern useful in the Account/Portfolio case, in fact we have some rules that must always be enforced for the Account and all its...
Okay, so I should have brought in my own example instead of using one I didn't fully understand. Forget Account/Portfolio (in this context, that is). Our...
How do you make Hibernate use a factory method to create a complex aggregate out of persistence? I've not noticed any information about that in the Hibernate...
From what I understand of the example, I would not model this as one aggregate. Batch and Donor would both be aggregates of their own. Maybe even Donations...
I have read a lot of examples that uses a repository interface and impelmented as CRUD data access objects. In your experiences how have you managed to...
I think the main difference is that a repository is a first-class member of the domain model and has characteristics beyond those of a simple DAO like allowing...
I would agree. I consider the DAO as an implementation detail that's not part of the public face of the domain model. In one project, I had a repository...
I think it really depends on how you are handling the persistence. We are using NHibernate and use something very similar to Ayende's generic repository. This...
Thanks all for your replies it helps validate my design thoughts. Another issue I battle with is the anemic domain model which I tend to use. I use it because...
... the repository. When you say "UI", what specifically do you mean? A specific view component (e.g. jsp page), a web application that uses the domain ...
Yeah, my fault for not explaining things better in my original post. However I don't see that there is necessarily a big problem with using aggregates in your...
I thought they could be private in NHibernate, in fact looking at the samples I have locally I am using private no-arg constructors for NHibernate so unless...
As far as design decisions go I'd far rather have a protected constructor rather than have to use concrete factories or creation methods in situations where...
Pascal - I think we're saying the same thing - at least compatible things. I do want to add that the navigations involved are not just Donor->Donation and...
Definitely, though I think its worth trying to avoid having your domain classes depend on your repositories as far as possible. ... a ... creating ... an...
... domain classes depend on your repositories as far as possible. What is gained by avoiding that? If your entity (EntityA) contains non-trivial logic that...
Jeff, I am using the term UI loosely, I am implementing the MVP pattern for the presentation layer so in this case it will be the Presenter classes that I mean...
Sure but the key thing for me would be to look at what relationships should be associatinons in the domain and what should be available via repository queries...