[Uml-devel] Friend permissions between classes

Jens Krüger Jens.Krueger at frm2.tum.de
Thu Aug 7 00:02:04 UTC 2003


Am Mittwoch, 6. August 2003 19:24 schrieb Jonathan Riddell:
> On Mon, Aug 04, 2003 at 01:07:43PM +0200, Jens Kr?ger wrote:
> > Am Montag, 4. August 2003 12:29 schrieb Oliver Kellogg:
> > > I am starting to remove the friend permissions between
> > > kdesdk-umbrello classes.
> >
> > This is a good idea, but I think you should not remove the existing
> > relations between the *Widget and *WidgetData classes. The current
> > state is a clean separation between the UML representation (in the
> > *WidgetData classes) and the KDE representation of the elements on
> > the screen (the *Widget classes). So you are ready for changes in
> > the KDE and UML without a lot of changes in the code.
>

Sorry, if I'm not agreed with you. My experiences in the software development
show me, that it is very useful to split this two parts into two classes where
the *Widget classes use the *WidgetData classes. The classes are smaller
and you may concentrate your work on the main goal of the class. I know
(from my long work in the software development) that it is better to split the 
classes than to have a huge class which incorporates all (functionality, display,
storing mechanism, and ...). This mixture of all in one classe is very 'dangerous' for
the further development.

At the first view it seems to be a lot of work more than to have all informations in one
class, but in further development it is more helpful to have a function for accessing
a certain information than a simple member. If you have to change the access to the
information you have only to change the implementation of the access function and
not all access to the member variable. (This is called information hiding and it is a 
good technique for large projects).

I hope I could give some good arguments for the splitting and a lot against it. If not
you may feel free to 'simplify' the class hierarchy. 

Jens

> I'm not convinced by this.  The very tight coupleing of these classes
> just means there is extra work to get at variables etc, but does not
> simplify much when changes are made to the structure.
>
> > > This is a first tender preparation for a big *Widget/
> > > *WidgetData cleanup where the WidgetData classes only
> > > serve as the base classes for the Widget classes, but
> > > there would not exist any WidgetData objects - only
> > > Widget objects.
>
> Parse error on sentence.
>
> The WidgetData classes are base classes but there would not exist any
> WidgetData classes
>
> Do you mean it's a two step move where WidgetData classes are base
> classes then are got rid of altogether?
>
> > > (That cleanup is a major design change so it won't be
> > > ready anytime soon.)
>
> You'd need to be careful to keep the file loading and saveing working,
> probably similarly with the clipboard.
>
> But I think it would be a simplification if done (maybe Jens can argue
> otherwise though).
>
> Jonathan Riddell
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Uml-devel mailing list
> umbrello-devel at kde.org
> https://mail.kde.org/mailman/listinfo/umbrello-devel

-- 

Jens Krüger

Technische Universität München
ZWE FRM-II
Lichtenberg-Str. 1
D-85747 Garching

Tel: + 49 89 289 14 716
Fax: + 49 89 289 14 666
mailto:jens.krueger at frm2.tum.de
http://www.frm2.tum.de/




More information about the umbrello-devel mailing list