Re: Patterns Question



Hello Sameer,

I took a look at the pattern you referenced. If your requirements are as
you described in your initial post, then the referenced pattern is overkill.

The pattern you mention is not called the Role pattern. It is called the
Role Aspect Pattern, and is a proposal before a PLoP conference in Europe
(which means that the patterns community has not accepted it yet). If I
were at a PLoP conference and this paper were presented, I would challenge
it on the basis that it rejects the advice of "prefer composition over
inheritance" in that it specifically recommends a fairly steep inheritance
tree in order to present the capabilities of the pattern, even while making
reference to at least six other papers that reject the notion of inheritance
in favor of the decorator pattern for that particular use.

In addition, the pattern specifically applies to user agents. Unless you
are developing a system where the active behavior of an object is different
depending on the role that has been assigned to it, and the system is
involved in simulation-style activities (not part of your criteria), then
I'd say that this pattern is interesting, but not useful for your situation.
I'd also say that, were you developing for a system of this nature, then a
decorator pattern would be far more useful than a steep inheritance tree.

You mention that you believe that your problem is behaviorial:

> In a way it seems like a behavioural pattern since the role of the team
> member changes depending on certain attributes, however on the other
> end if additional attributes are needed to qualify the entity e.g. if
> the role were "Programmer" additional attrbutes could be needed to
> qualify "programmer" like UI Designer, Middleware Integrator etc., then
> it seems more like a structural pattern.

You used the word "if" to discuss the need for additional attributes which
leads me to believe that you do NOT have additional attributes depending on
roles. Therefore, it is a matter of assigning a role to a team member based
on attributes. However,the behavior of your system does not change based on
the assigned role. Therefore, the role attribute is simply a dependent
variable. It does not drive the availability of methods or change how the
object is available for interactions with other objects.

In fact, as I pointed out earlier, the attribute of the "role" of an
individual in your system is not even assigned to the member. It is
assigned to the relationship between a member and a team. As I mentioned
before, the Builder pattern is useful for situations where data is read and
interpreted during the construction of a tree of objects. This is still the
only pattern I see in your description.

Do you have constraints that you have not shared?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--


.



Relevant Pages

  • Re: What is complexity?
    ... >>> reference computer is irrelevant at all. ... >>> complexity of the computer may be large, ... > the following pattern onto the wires: ...
    (talk.origins)
  • Re: Vote for the generally accepted what is physically going through both slits in the Double Slit E
    ... pattern will be obtained in the two cases, ... The light travels two different distances to the observer at M. ... The lightning strike occurred at A' in the frame reference of the ... This is ordinary Galilean relativity. ...
    (sci.physics)
  • Re: Immortality vs. copies
    ... The atoms and molecules ... pattern made up of ever changing components. ... do on down to the atoms. ... And why do you think the words are not a reference to that changing system? ...
    (comp.ai.philosophy)
  • Re: ID vs. non-ID - Predictable Pattern Limits
    ... algorithmically random with respect to all reference computers. ... pattern based on the detected bias, with determining the origin of the ... knowledge of bias or predictive value based on the detection of bias ...
    (talk.origins)
  • Re: Heathrow Show impressions
    ... pattern and the way it is to be interpreted. ... bitstream alters you may find the output waveform keeps its pattern, ... a reference level to interpret the 'digital' pattern. ...
    (uk.rec.audio)