Thursday, November 19, 2009

Two Approaches For Creating Aggregates in DDD

Tonight I´m working on a project where I try to implement DDD. One of the things my mind has worked on for a long time is how upo should make the communication between aggregates, Should it be lazy load, should I somehow store an ID for entities in anoter aggregate or how can I do it?

I just found this nice article showing two different approaches for exactly this topic here. I think I will try out both solutions and later thoose the one that best suites my needs and mind :)

If anybody have other approaches, please feel free to leave a comment.

1 comment:

Rolf Therkildsen said...

I see one problem with aggregate documents when you wish to add functionality to one aggregate that uses information in another aggregate (add a method to order that uses information from customer). How do you get that information without lazy load? With a call to your repository?