comp.lang.ada
 help / color / mirror / Atom feed
From: John Robinson <john@jr-and-assoc.demon.co.uk>
Subject: Re: pointers & OOP
Date: 1999/05/06
Date: 1999-05-06T00:00:00+00:00	[thread overview]
Message-ID: <yuX0TCA7JbM3EwQL@jr-and-assoc.demon.co.uk> (raw)
In-Reply-To: x7v7lqmu4is.fsf@pogner.moho

In article <x7v7lqmu4is.fsf@pogner.moho>, Simon Wright
<simon@pogner.demon.co.uk> writes
>John Robinson <john@jr-and-assoc.demon.co.uk> writes:
>
>> Hence, a mapping from UML to Ada 95 should always map a single UML
>> class box onto a package containing a single tagged type.  Although
>> the language allows multiple tagged types to be declared in a single
>> package it makes no sense whatsoever to do so.
>
>It may make sense to have such a rule with regard to public
>types. Indeed, you need some such translation rules between the UML
>and the Ada or you are going to get lost (I suppose you could have a
>'design' stage, where you map the UML onto the Ada using some other
>formalism; I don't know enough about UML, perhaps it has this
>technology inbuilt).

No I wouldn't say that any of this was "built in" to the UML but if you
consider that the primary public type represents the data-centered heart
of an object one can see that it acts as a hook onto which you may hang
behaviour.  Having two hooks inevitably means bringing more behaviour
into one class with the danger that you then confuse the role of the
class give too much responsibility to one class (resulting in increased
maintenance overhead on that class).

>
>Perhaps there could be a set of patterns for recognising UML clusters
>that should be translated into Ada using multiple-types-in-one-package.
>

Maybe, but it may be simpler to stick to a consistent mapping rule. 

>However, I can see no need to restrict yourself with regard to private
>types! of course, they are implementation support and so not likely to
>appear in the UML anyway ..
>

Agreed.  Similarly for "support" types, i.e. those built merely to
support the declaration and/or use of the main type.  In the Booch
component is the arc a support type or an entity in its own right? 
The key factor (for me - and I am sure that I will get shouted at for
saying this) is that if a type is associated with behaviour then this
behaviour should be physically implemented in a dedicated, cohesive
package.  
-- 
John Robinson
John Robinson & Associates
www.jr-and-assoc.demon.co.uk




  reply	other threads:[~1999-05-06  0:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-01  0:00 pointers & OOP Matthew Heaney
1999-05-01  0:00 ` Matthew Heaney
1999-05-03  0:00 ` John Robinson
1999-05-03  0:00   ` Samuel Mize
1999-05-04  0:00     ` Martin C. Carlisle
1999-05-04  0:00     ` Robert Dewar
1999-05-04  0:00   ` Robert Dewar
1999-05-04  0:00     ` Mike Silva
1999-05-05  0:00     ` John Robinson
1999-05-05  0:00       ` Robert Dewar
1999-05-08  0:00         ` Ehud Lamm
1999-05-05  0:00       ` Robert Dewar
1999-05-05  0:00         ` John Robinson
1999-05-06  0:00           ` Brian Rogoff
1999-05-07  0:00             ` dennison
1999-05-07  0:00               ` Brian Rogoff
1999-05-10  0:00                 ` dennison
1999-05-11  0:00                   ` Jean-Pierre Rosen
1999-05-11  0:00                     ` dennison
1999-05-10  0:00             ` John Robinson
1999-05-14  0:00               ` Matthew Heaney
1999-05-14  0:00                 ` David Botton
1999-05-14  0:00           ` Matthew Heaney
1999-05-14  0:00             ` Ed Falis
1999-05-05  0:00       ` Matthew Heaney
1999-05-06  0:00       ` Tom Moran
1999-05-06  0:00         ` John Robinson
1999-05-06  0:00           ` Tom Moran
1999-05-07  0:00             ` dennison
1999-05-07  0:00             ` dennison
1999-05-07  0:00             ` dennison
1999-05-10  0:00             ` John Robinson
1999-05-14  0:00         ` Matthew Heaney
1999-05-06  0:00       ` Simon Wright
1999-05-06  0:00         ` John Robinson [this message]
1999-05-08  0:00           ` Simon Wright
1999-05-10  0:00             ` John Robinson
1999-05-05  0:00     ` Francois Godme
  -- strict thread matches above, loose matches on Subject: below --
1999-05-01  0:00 Tom Moran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox