... So assuming that all dependencies are on the interfaces, I would say that you are in fact following the Dependency Inversion Principle (i.e. "Abstractions...
Thanks Udi and Vaughn. ... It's my fault for not explaining what Sales, Purchases, and Expenses are in the context of performance. Sales for example are driven...
I am modelling a simple library domain and have identified the following entites: - Book - Copy - Member - Loan I have also identified these aggregates - Book...
The definition of Value Objects, Entities, etc comes from the domain you are modeling. You should "hear" the domain, it will tell you what is an enityt and...
Indeed we do revalidate the commands. So if hackers send us bad commands, let them get a crappy user experience and wait for the rejection email. Commands from...
Here's one way to analyze this. If the comment needs to maintain a thread of continuity, a lifetime, then it is an Entity. So, for example, if the comment is...
... Bugs here, bugs there. Garbage in, garbage out. Temper your expectations once you allow bugs in the mix. Event sourcing isn't a silver bullet either. --...
That's not all there is to Layers. With a Layers architecture, the interface policies in a given layer may be referenced only by a layer above it. It doesn't...
I suggest giving more specific names to the concepts of your domain for the case of book copies. Maybe [BookTittle, Book] makes more sense in terms of the UL....
... Not necessarily. An Aggregate will have an Aggregate Root, which is an Entity. That root entity will many times have a reference to one or more other...
... That's really up to his DEs. ... Where do you get the idea that there is always only one Aggregate and hence one Repository in any single given BC? Isn't...
The domain in which concepts like View, Controller and Presenter makes sense is a framework that implements these concepts, eg Spring Webflow or Struts. But...
Ah, I see what you mean, how about this... So I have a database table of Books (ISBN, Title) and a table called Copies (CopyId, ISBN (FK)) my Book aggregate...
I think we got 1 AR per use case (not for BC). Sorry for typing the wrong word. We got more than 1 Repository per use case since 1 is for the AR and other/s...
The example code book.doSomethingToCopy(aCopyId) is not about getters/queries. It is about commands (see traditional CQS, Meyer). To use your example we could...
I'm curious: assuming you are using event sourcing, where would you check the unique constraint? I would do a query in the command handler before calling the...
Here's some questions to ask yourself: 1. is the Comment object immutable? If no, then it's an entity 2. is it small in size (like a string or a number)? If...
Hi everybody! It's been almost 5 months since I started my DDDSample.Net project. I would like to share with you some information on the current state of the...
Where's the code? Joni ... would like to share with you some information on the current state of the project. ... baseline for any comparisons. There is also...
When you update the comment do you get the same comment given by the person at that point in time? You need to ask your domain experts. Because you could get...
I'm still trying to grasp the idea of completely private state on entities. How do you test those entities? lets for the sake of the argument say that we have...
mmm the addItem could return the item count and you can test the return value other kind of operations could be side-effect-free and easily testable......
Use -expectations- instead of checking state. I use Mockito that is semantically great. testOrderLineShouldBeCreated [ Collection lines = mock(...) // mock the...