Search This Blog

Thursday, April 1, 2010

Strengthening your domain: Avoiding setters

link -> Strengthening your domain: Avoiding setters

As we start to move our domain model from an anemic existence towards one with richer behavior, we start to see the aggregate root boundary become very well defined.  Instead of throwing a bunch of data at an entity, we start interacting with it, issuing commands through closed, well-defined operations.  The surface of our domain model becomes shaped by the actual operations available in our application, instead of exposing a dumb data object that lets anyone do anything, and consistency and validity are a pipe dream.

Cool series

No comments:

Post a Comment