Specialization hierarchy in a domain-model
Posted
by devoured elysium
on Stack Overflow
See other posts from Stack Overflow
or by devoured elysium
Published on 2010-05-31T03:36:19Z
Indexed on
2010/05/31
3:42 UTC
Read the original article
Hit count: 338
I'm trying to make the domain model of a management system. I have the following kinds of persons in this system:
employee
manager
top mananger
I decided to define a User, from where employee, manager and top manager will specialize from. What I don't know is what kind of specialization hierarchy I should choose from. I thought of two ways:
or
Which might be preferable and why?
As a long time coder, every time I try to do a domain-model, I have to fight against the idea of trying to think in how I'm going to code this. From what I've understood, I should not think about those matters in the domain-model, only in object relationships. I don't have to think of code duplication or any of these kind of details here, so I can't really pick any of the options over the other.
Thanks
© Stack Overflow or respective owner