Thursday, November 20, 2008

Basic types go home [posted June 10th 2005 15:49]

As we did see at least in UML 2 there seems an equal treatment of associations and attributes. But why do we need the difference between composites and attributes anyway? They will never be treated comletely equal because you can name the two sides of an association and only name and attribute ones.

Why do we need to make the distinction between a composition and an attribute? One reasons that springs to mind is the much less cluttered class diagrams one gets using attributes. This however is just a way of representing a model visually. I can not let that one count.

The only reason I can think of is the fact that you can not have a composite association to basic types. Ehm, so why did we need those again? There are quite a number of OO languages that do without them. Is it a coincidence that these languages also have a realy elegant feel to them (Small Talk to name but one, and did I mention Ruby, getting to know that one, too little time though).

I guess one does not have to use the basic types, hmmm, I shall give it a serious try next modelling job I take on.

No comments: