[New-ITS] UML attributes vs associations

Tim Benson tim.benson at abies.co.uk
Wed Jul 19 13:48:09 BST 2006


Grahame

No.  Not in any way that I can think of.  Whether the primary audience is
domain experts or software engineers we are still have a paramount concern
to minimise the possibility of ambiguity, misunderstandings and hence
errors.

Tim

On 19/7/06 13:17 Grahame Grieve wrote:

> so does the subsequent exchange about the primary concern of
> the UML diagrams change any your views expressed here?
> 
> Grahame
> 
> 
> Tim Benson wrote:
>> Graham,
>> 
>> When using UML we are primarily concerned with precise human to human
>> communication, so the method which gives less chance of misunderstanding and
>> error by different readers of the model or diagram is preferred.
>> 
>> Attribute multiplicities greater than 1, complex attribute types and
>> splitting closely-related things into different classes are three
>> independent issues, covered in my original reply.  All three lead to
>> frequent misunderstandings on first reading, as indicated by the amount of
>> time devoted to explaining them in committee meetings.
>> 
>> On the issue of trees and acyclic graphs, both message analysis models and
>> implementable models should be trees.
>> 
>> This reminds me of two other easily preventable causes of misunderstanding,
>> namely failure to make association navigation and multiplicities explicit.
>> 
>> Therefore, all associations should include navigation arrows showing that
>> they can only be read in the direction specified .
>> 
>> Finally, all association and attribute multiplicities should be shown, even
>> when they are [1] (the standard default).
>> 
>> Tim
>> 
>> 
>> On 19/7/06 08:51 Grahame Grieve wrote:
>> 
>>> hi Tim
>>> 
>>> thanks. I think it makes sense, but what, specifically, makes
>>> things better one way or another?
>>> 
>>> is it just style?
>>> 
>>> I guess in the context of an implementable model, we have a tree
>>> not an acyclic graph, so aggregation is firmly resolved and
>>> attributes vs associations seems to have less impact that it
>>> otherwise might?
>>> 
>>> Grahame
>>> 
>>> 
>>> Tim Benson wrote:
>>>> UML allows you to anything you like, but in general modelling I like to see
>>>> associations to separate classes when multiplicities are 0..* or 1..* (SET,
>>>> LIST or BAG); Attributes are best when their multiplicities are either 1..1
>>>> or 0..1.
>>>> 
>>>> This is reinforced when the relevant objects have a complex structure (e.g.
>>>> Name, address and telecom) and the objects represent discrete real world
>>>> things which would usually be handled as separate classes in a host system.
>>>> 
>>>> Things that are closely related  work well as attributes of the same class,
>>>> even if they are at opposite ends of the RIM e.g. Date of Death (Entity)
>>>> and Death Notification Status (Act).
>>>> 
>>>> 
>>>> Tim 
>>>> 
>>>> 
>>>> 
>>>> On 19/7/06 07:49 Grahame Grieve wrote:
>>>> 
>>>>> Would anyone like to express an opinion on the
>>>>> subject of using attributes or associations in
>>>>> the UML for the implementable model?
>>>>> 
>>>>> Grahame
>>>>> _______________________________________________
>>>>> New-ITS mailing list
>>>>> New-ITS at lists.hl7.org.uk
>>>>> http://lists.hl7.org.uk/mailman/listinfo/new-its
>>>>> 
>>>> 
>>>> 
>> 
>> 
>> 




More information about the New-ITS mailing list