Make Those Value Objects Work For You

We can have value objects be more than just information carriers. We can have them do some work for us. A Scenario Given a contract and some time sheet data for an employee we need to calculate invoice lines for billing a client. We can use an object called an InvoiceLineCalculator to calculate the resulting invoice lines. Even though an object like this feels different from the ValueObjects we talked about previously, I am going to argue that it can
- Make Those Value Objects Work For You

Read more

Value Objects

Continuing on the domain object theme from my previous post, we will be discussing Value Objects. To recap, Domain Entities want to persist their value over time and can be uniquely identified by a single identification property. Next we will discuss Value Objects. So what is it? A Value Object is uniquely identified by the values of its properties. Multiple instances of a value object with the same properties, represent the same object in a particular context. A simple example
- Value Objects

Read more

Entity is for Identity

Continuing on our Domain Driven Design thread, we will talk about domain specific objects in the next few posts. We start with the Entity. Entity is one of the three main base objects in our domain core. It is not to be confused with an entity in EntityFramework! In most applications there will be some kind of persistence meaning there will be objects that outlive the lifetime of a usage session. We need to keep track of these objects between
- Entity is for Identity

Read more

Domain Driven Design App Structure part 2

In my previous post, I gave an overview of what an implementation of a Domain Driven Design Application might look like. I will be running a C# project in parallel with my Practical Domain Driven Design Articles. The plan is to eventually provide a full project template that can be used either as a DDD reference project or as a starting point for a new application. You can find the SimpleDDD project on GitHub. Kicking off SimpleDDD If you have
- Domain Driven Design App Structure part 2

Read more

Domain Driven Design App Structure

At the center of our DDD universe lies the Domain. It is the beating heart of our application. The life of our application flows out of the domain like blood through the body. DRAMA! What I am trying to get at is that the domain is really important. I mean it is right there in the name: Domain Driven Design. It is the place where we model our real life problem. We share this domain with the experts in the
- Domain Driven Design App Structure

Read more