mhinze.com

Matt Hinze, learning in public

More On Value Objects

A few days ago Dylan Beattie wrote a nice post about value objects.  He explains the idea in a more palatable way than my attempt: If it’s not clear how to model a particular element in your model, try asking “which one?” If the question makes sense within your own scenario then you’re probably dealing [...]

Adding to a Value Object property always adds to it, never adds another instance to it.  Distinguishing Value Objects by maintaining a collection of them implies identity. It is a mistake to attempt to maintain a collection of Value Objects. Let’s take the near-canonical Address, a perfectly valid Value Object as described on page 98 [...]

Audit options with NHibernate

In this post I am talking about auditing for the business, not the technical infrastructure.  As an example story, users will want to see certain fields highlighted on a grid if that field has changed in the last week, and the info about the change (who, when, what) should be a tooltip for the cell. [...]