Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs

Monday, June 13, 2011

Martin Fowler - Dealing With Roles

Dealing With Roles
People may do many things within a company. You have engineers, salesmen, directors, accoun-
tants, any of which may need different features in the computer systems within your organiza-
tion.
Dealing with these situations is one of the most common situations in modeling. You have a
group of objects which exhibit bunches of common behavior. They don’t all have the same be-
havior, but they may have some common behavior. At first glance it sounds like a classic case
for inheritance, but there are complications. An object might exhibit more than one bunch of be-
haviors, or may take on new bunches during its lifetime. You may have an agent who is also a
customer, you have an accountant who becomes an engineer.
This paper is an analysis patterns paper, hence I’m looking at the alternatives from a conceptual
point of view, rather than an implementation point of view. I’m asking how we represent our
view of the world in our software, and I’m not looking at important implemenation issues such
as performance, distribution, concurrency etc. I’ve provided some code samples, but they are
there to illustrate the conceptual ideas rather than as statements of what the implementation
should look like. The biggest consequence to this is that I’m concentrating much more on inter-
face than on implementation.

No comments:

Post a Comment