On Tue, Sep 9, 2008 at 10:01 AM, Rickard Öberg <[EMAIL PROTECTED]> wrote:
> Niklas Uhrberg wrote:
>>  I think "QualifiedAssociation" is adequate, I have to taste it a bit
>> more to see if I like it ...
>>
>> Generally, XXXAssociation sounds better to me than AssociationXXX . To
>> me it says that it's a sort of association, not a part of, or something
>> related to the association.
>> In both of the designs we're talking about, it's the association itself
>> that we obtain from e.g. Person.
>> Terms on the from AssociationXXX indiactes (to me) that it's a property
>> of the association, not the association itself.
>
> Well, I am just doing some research on terminology, and it seems as
> though Association Role is actually what this is called. See here:
> http://www.jot.fm/issues/issue_2002_09/column2/
> and:
> http://en.wikipedia.org/wiki/Role_Class_Model
>
> However, the implementation would then logically be called Role and not
> AssociationRole. Using it would then look like this:
> interface Movie
> {
>    ManyAssociation<Role<Person,Part>> actors();
> }
>
>
> Meaning, "actors" is a list of people who played various parts.
> Role.role() would still be a convenience method to create the Role, so
> using it would look like:
> tellingLiesInAmerica.actors().add(role(kevinBacon,billyMagic));
>
> Which is ok I think.

Taking an example where the domain model is using "Role" is
counter-productive, as I think it blurs our perceptions.

There is also the constant balance between when is the "Role" part of
the association vs becoming its own intermediate entity. For instance,
are "roles" searchable? If not, then the intermediary "Role" entity
may have to exist in a movie application.


Cheers
Niclas

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to