Rakesh's Blog

Association

Here is a link to a site that describes what “Association” means in UML 2.

 

We have “Show as Association” in the context menu. Choosing the option displays a line between the two related types.

 

For example, if you have the following standard C++ code…

 

class KeyBoard {};

 

class Computer

{

      KeyBoard* keyBoard;

};

 

You view the classes in C++ Class Designer. You then right mouse click on the “keyboard” field in the “Computer” class. The context menu would show up.

 

You choose “Show as Association” and we will show a relationship between “Computer” and “KeyBoard” classes.

If you check out the image that shows the context menu, you will find another menu item “Show as Collection Association”. What this would do is…

 

using namespace System;

using namespace System::Collections::Generic;

public ref class Customer

{

      List<Order> orders;

};

 

If you right click on the field “orders” and choose “Show as Collection Association”, then it would actually draw a line relating the “Customer” class and the “Order” class, which is the collected type. Choosing “Show as Association” on the same field would actually draw a line relating “Customer” class and the “List” class.

 

Is the name “Show as Association” and “Show as Collection Association” intuitive enough?

 

Would UML aware users not like it, because it is the simplest form of Association and has no other decorations to it and also a Composition would be shown as an Association?

 

Would semi UML aware or non UML aware users find the words “Association” and “Collection Association” overwhelming? Would they be discouraged to use the feature or the term, so as to avoid any miscommunications with their UML aware colleagues?  If so, could you please suggest some alternatives?

Published Friday, September 10, 2004 8:33 AM by rakeshna

Comments

 

Bryan Rieger said:

I have been looking at this entry off and on for some time. Since the "List" class is a Generic, would this be modeled as a parameterized class (much like a template would be, even though a Generic is different from a template) ? If not, how will the user understand that it takes a parameter by just looking at the model?

If it is modeled as a parameterized class, will you be supporting bind dependency?

Unfortunately in reading through some of the UML 2.0 documents it appears as though parameterized classes are called templates and bind dependency is called templatebinding. Which is short sighted given Gererics could be modeled the same. Which is why I would prefer the older terminology.
October 5, 2004 12:20 PM
 

Rakesh's Blog said:

October 29, 2004 1:55 AM
 

Rakesh's Blog said:

October 29, 2004 1:57 AM
 

Rakesh s Blog Association | Outdoor Decor said:

June 13, 2009 6:23 PM
 

Rakesh s Blog Association | garden decor said:

June 19, 2009 3:04 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker