Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: alicecbrown on February 28, 2007, 06:58:20 am

Title: Duplication of names for both 'state' and 'method'
Post by: alicecbrown on February 28, 2007, 06:58:20 am
 ???  Why, when duplication of names is so dangerous, are we allowed to use the same name for a method as for a state?  And this isn't information hiding at work, since both are public.  Is there a GOOD reason for this?  :-/
Title: Re: Duplication of names for both 'state' and 'met
Post by: sargasso on February 28, 2007, 04:26:03 pm
Not that i KNOW of.

UML says nothing about a constraint of this type.  In fact, a diagram, an object, it classifier, its attributes and methods and states can all have the same name.

The uniqueness constraint has been explored in these forums before.  There still remains some unquietness in all camps regarding it.

IMO the "real" UML constraint on uniqueness is that any structural element of type "a" in a model having a name "X" refers to a unique entity in the real world.  Thus in a model with 6 diagrams/packages each containing a classifer "XXX", each of these model items is referring to the SAME real world item.

Any further delineation is handled via UML namespacing.

(Note I have succinctly and deliberately avoided ANY comment on packages v namespaces. NFCWBEI)

regards
bruce
Title: Re: Duplication of names for both 'state' and 'met
Post by: alicecbrown on March 01, 2007, 05:42:24 am
Further analysis of the code emerging from this design is called for, to guard against the confusion of identical names.  Hopefully, the programmer did not carry this PERCEIVED problem into the code.
by the way, we do not use EA to generate code, nor do we use the Requirements feature for traceability since we have entirely too much many to one and one to many relationships between requirements and  design.