comp.lang.ada
 help / color / mirror / Atom feed
* UML Ada modeling question
@ 2000-04-10  0:00 Bill Watkins
  2000-04-10  0:00 ` Ray Blaak
  0 siblings, 1 reply; 5+ messages in thread
From: Bill Watkins @ 2000-04-10  0:00 UTC (permalink / raw)


Can anyone suggest a form for modeling nested Ada packages in a UML
component diagram?

Thanks,

--
Bill Watkins
Applications Architect
Information Systems
Boeing Houston Operations

"Any opinions are my own and do not express those of the Boeing company."





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: UML Ada modeling question
  2000-04-10  0:00 UML Ada modeling question Bill Watkins
@ 2000-04-10  0:00 ` Ray Blaak
  2000-04-11  0:00   ` Ray Blaak
  2000-04-12  0:00   ` David Kristola
  0 siblings, 2 replies; 5+ messages in thread
From: Ray Blaak @ 2000-04-10  0:00 UTC (permalink / raw)


"Bill Watkins" <bill.watkins@noway.boeing.com> writes:

> Can anyone suggest a form for modeling nested Ada packages in a UML
> component diagram?

An Ada package would correspond to a package that contains classes
(i.e. types). Classes can be assigned to components.

If you are using Rose, create a category (package that contains classes) that
corresponds to the Ada package, and put the package's types as classes within
it. Then assign those classes to a component in your component view.

You could also create a subsystem (a package that contains components) if
appropriate. 

-- 
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
blaak@infomatch.com                            The Rhythm has my soul.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: UML Ada modeling question
  2000-04-10  0:00 ` Ray Blaak
@ 2000-04-11  0:00   ` Ray Blaak
  2000-04-12  0:00   ` David Kristola
  1 sibling, 0 replies; 5+ messages in thread
From: Ray Blaak @ 2000-04-11  0:00 UTC (permalink / raw)


Ray Blaak <blaak@infomatch.com> writes:

> "Bill Watkins" <bill.watkins@noway.boeing.com> writes:
> 
> > Can anyone suggest a form for modeling nested Ada packages in a UML
> > component diagram?
> 
> An Ada package would correspond to a package that contains classes
> (i.e. types). Classes can be assigned to components.
> 
> If you are using Rose, create a category (package that contains classes) that
> corresponds to the Ada package, and put the package's types as classes within
> it. Then assign those classes to a component in your component view.

Whoops, forgot about the nesting.

Nested packages can be modelled directly by nesting the categories. Again, the
classes can be assigned directly to the component.

The component usually corresponds to the source file with the implementation,
and does not indicate the nesting directly. Rather, the nesting is indicated
in the class diagrams.

If you really want to show the nesting in component diagram (especially for
child packages where they are in different files), create a subsystem for each
package, nested accordingly. Also create a corresponding component to describe
what types (i.e. classes) are in each package. E.g for these packages:

  package Root is
    type Root_Class is ...
  end Root;

  package Root.Child is
     type Child_Class is ...
  end Root.Child;

Create these components and subsystems:

  Root\
    Root.ada <-- Root_Class is assigned to this component
    Child\
      Root_Child.ada <-- Child_Class is assigned to this component

The logical view would have these categories and classes:

  Root\
    Root_Class
    Child\
      Child_Class

-- 
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
blaak@infomatch.com                            The Rhythm has my soul.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: UML Ada modeling question
  2000-04-10  0:00 ` Ray Blaak
  2000-04-11  0:00   ` Ray Blaak
@ 2000-04-12  0:00   ` David Kristola
  2000-04-12  0:00     ` Ray Blaak
  1 sibling, 1 reply; 5+ messages in thread
From: David Kristola @ 2000-04-12  0:00 UTC (permalink / raw)



On Mon, 10 Apr 2000 17:04:22 -0700, Ray Blaak wrote
(in message <u3dotqz95.fsf@infomatch.com>):
>> Can anyone suggest a form for modeling nested Ada packages in a UML 
>> component diagram? 
> 
> An Ada package would correspond to a package that contains classes (i.e. 
> types). Classes can be assigned to components. 
> 
> If you are using Rose...

Object Team (a.k.a. COOL:Jex) does not allow nesting of UML packages,
and if we had used a subsystem per package, well, it would have been
a nighmare.  I don't know how it would have turned out if we had used
Rose.

We have been representing nested and child Ada packages as classes
that are "a part of" the root class (Ada package).  We went with
mapping classes to Ada packages.  Our system is really object based,
not object oriented.

I really like UML, but it can be difficult to capture some Ada
concepts in it.

--djk
email not spam to the name given above but at the AOL domain.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: UML Ada modeling question
  2000-04-12  0:00   ` David Kristola
@ 2000-04-12  0:00     ` Ray Blaak
  0 siblings, 0 replies; 5+ messages in thread
From: Ray Blaak @ 2000-04-12  0:00 UTC (permalink / raw)


"David Kristola" <David95037@See-My.Sig> writes:
> Object Team (a.k.a. COOL:Jex) does not allow nesting of UML packages,
> and if we had used a subsystem per package, well, it would have been
> a nighmare.  I don't know how it would have turned out if we had used
> Rose.

This seems to me to be a unnecessary and irritating limitation. Hierarchical
namespaces are a critical ability for any large system, especially when
mapping to a language like Ada that has it.

At any rate, Object Team is not adhering to the UML standard. A package is
explicitly specified as a namespace that can contain, among other things, sub
packages.

I suppose you can "fake" by naming your packages with a dot syntax, e.g. Root,
Root.Child, etc, but things just compose better with true hierarchies,
especially considering visiblity to parent names, etc. Of course, your
solution works too.

-- 
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
blaak@infomatch.com                            The Rhythm has my soul.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-04-12  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-10  0:00 UML Ada modeling question Bill Watkins
2000-04-10  0:00 ` Ray Blaak
2000-04-11  0:00   ` Ray Blaak
2000-04-12  0:00   ` David Kristola
2000-04-12  0:00     ` Ray Blaak

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