Tag Archives: .net

diyes: practical modeling of aggregates

I decided to start working on a simple example, a bank application, that shows how aggregates can be modeled using Diyes.

The aggregate I decided to model is a bank account, it will exemplify some basic concepts of aggregate modeling. First of, we create a class that inherits from AbstractAggregate

public class Account : AbstractAggregate

How we normally go about modeling aggregates is we expose methods which are the commands that can be performed on our aggregates. So in this case I decided to have an Open, a Deposit and a Withdraw method. First thing we do in these methods is checking the preconditions for their execution, if the preconditions are met, we apply an event describing what happened. Continue reading diyes: practical modeling of aggregates


diyes: time for aggregates

Hi again,

After we have seen how the event store works by saving and loading events related with an identity, in this post I am going up in the abstraction layer and talk about aggregates. A very good introduction to aggregate design can be found in Vaughn Vernons’ articles – Effective Aggregate Design.

Continue reading diyes: time for aggregates