A good read

I have just finished reading “Applying Domain-Driven Design and Patterns” by Jimmy Nilsson.

This is the closest that I have seen anyone come to the approach that I have discussed here.
One of the big differences that he aims to have a model that can be saved at any time.
The approach that I had was to have a model that could take what ever input the user gave (irrespective of the ability to save).  The problem comes when you are missing a mandatory field or if the user supplies XXX to a numeric field.

He opted to use an object relational mapper where I used code generation to create a distinct data access layer hierarchy.  He covers the context problem for business rules – but insists that they are part of the model.  My take is that the business rules do form part of the model but must be attached to the entities.

Leave a comment