The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Another UML question

Hey all,

when we have an association does the UML take the variable name or just the link arrow ?

----------------                          ------------
Class X                                    Employee
----------------          ------------>  -----------
ListOfEmployees
----------------

So (the implementation) it has a ListOfEmployees which results from it's association with the Employee class, but should the variable actually appear in the UML?

Thanks.
Dont remember by OMT classes
Wednesday, November 07, 2007
 
 
No. You can do one or the other, but don't need to do both. You can indicate the variable name using the endpoints of the association arrow.

Wednesday, November 07, 2007
 
 
Thanks
(Original poster here)
Thursday, November 08, 2007
 
 
"You can do one or the other, but don't need to do both."

But would it be incorrect to have both?

Thanks
(Original poster here)
Thursday, November 08, 2007
 
 
Its not really incorrect to have both.  Some UML tools require you assign the link to an attribute on the source class (parent of the relationship) to support code generation.  Others will auto generate the member for you. 

I say it is not useful to name the links if you are diagraming on the whiteboard with some coworkers.  In fact it could clutter the diagram and make it harder to understand or change things fast (agile modeling anyone?).  On the other hand it may be beneficial if you are putting the diagrams into a design document that will be handed to someone at a later date that is not familiar with the product

The bottom line is do what makes the diagram most useful at that point in time as you can always come back and change it if needed.
JR
Tuesday, December 04, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz