Re: Customizing a domain model
Eben Roux <eben <at> qualica.com>
2008-10-03 08:26:36 GMT
Hello Jørn,
This is a typical "have your cake and eat it" scenario that customers
think they'll need. It ends up being utterly dumb data and as soon as
your system (er... domain) requires knowledge of it in any way, manner,
or form, then it absolutely has to move into the domain. This
typically happens when business rules enter the fray.
If, however, you can treat treat the data as dumb I would create a sub-
domain (is this right?). I don't know if your core domain even need be
aware of this. Your front end sure would.
So you have a Person. Now your generic mechanism doesn't care what the
data belongs to. It simply contains the ID (guid is nice, heh?), the
type (or type name) --- Hair Colour, etc. --- and the value. This can
then be managed totally separate from your core domain without
resorting to the likes of "select *".
Regards,
Eben
------------------------------------