[Uml-devel] kdesdk/umbrello/umbrello

Brian Thomas brian.thomas at gsfc.nasa.gov
Wed Oct 1 09:42:07 UTC 2003


On Wednesday 01 October 2003 12:20 pm, Sebastian Stein wrote:
> Brian Thomas [031001 18:02]:
> > usability fix: Why is the default attribute 'private'? Many UML diagrams
> > are to display the functioning of the classes publically,
>
> Functioning is done with operations and not over attributes.

	Well, if you mean 'accessor methods' for 'operations' I mildly agree
	(people still do access classes via attribute/field call).

	But there are other reasons for defaulting to 'public':

	1. Inheriting classes often make use of attributes. Defaulting to
	private scope makes this not happen for sub-classes without 
	*having* to plug in the accessor methods/operations.

	2. I dont want to have to plug in an operation ('accessor method') for 
	each attribute I create in the UML diagram. That is *way* tedious
	and unneeded. Accessor methods should be deduceable from the
	scope of the operations and auto-generated. I agree that generated
	accessors may well have different scope from the attributes. 


	So I agree on some things you say.

	1. In the short term : I agree that the best way is to allow a configurable option for the
	user based on thier preference. If this existed, then I accept the default
	attribute can be 'private'.

	2. Longer term : also allow the user to configure code generation of 
	accessor method scope to be different from the attributes.


>
> > so it is of the most value for the designer to have public (and
> > protected) attributes on the diagram. Revert to old way; I get tired of
> > having to change every attribute I create back to public
>
> Well, it should be a configurable option, but for the common case it must
> be private. Because it is the thing of classes to hide attributes to the
> outside over interfaces. No one really should access them directly.
>
> Of course there may be other cases where it would be better to have it
> public by default, but a default value could only have one value and you
> can't satisfy all people with it...
>
> If I remember right, we had a bug report for this case which forced us to
> make it private by default. This is some time ago, I think it was before
> KDE inclusion.
>
> Nevertheless, please revert your change and maybe make it a configurable
> option.

	I will look into this.

			-b.t.

>
> Steinchen





More information about the umbrello-devel mailing list