n the previous article (Part 1, see left column) I showed the diagram illustrated in Figure 1. However, I didn’t
say very much about it, so now is a good time to do so.
Figure 1 A static
view of the domain model, old version
As you can see in Figure 1, I had
defined two abstract (MustInherit) base classes in the Jnsk.Domain assembly. The base classes
were called EntityCollectionBase and
The idea behind them was that all my domain classes would inherit from one or
the other. Classes that describe a single entity, such as a single customer,
would inherit from EntityBase.
Classes that describe a collection of rows would inherit from EntityCollectionBase.
This way the domain classes gathered under a common feature set, so a lot of
functionality is reused and policies are forced. The base classes were implementations
of the Layer Supertype pattern.