Re: UML Structured class with utility parts?
- From: "JMF" <jfavaro@xxxxxx>
- Date: Thu, 20 Apr 2006 19:58:00 +0200
"Rebecca Wirfs-Brock" <rebecca.wirfsbrock@xxxxxxxxx> wrote in message
news:1145547531.952355.32070@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Rebecca,
I think your problem is that your are trying to mix two views into a
single diagram.
I had that funny feeling ...
A component is a deployable unit of code...so in a
technical sense, it includes everything that is bound to it...so your
stacks and other utility classes are contained within a deployable
component.
That makes intuitive sense.
On the other hand, when you want to show what your design is about
(e.g. what classes are logically and perhaps physically organized
together and how they are used by other classes)...you need a different
view .
Makes sense, too.
Bran Selic, in a talk he gave last year at UML & Design World (Bran is
a key contributor to the UML specification) made the clear distinction
between a runtime view of a system architecture and a design time view.
I'm aware of Bran as a major contributor to the UML realtime profile.
He recommends using package diagrams (which can contain what ever
design elements you want to include--class diagrams, but could also
contain state diagrams, sequence diagrams, etc) and drawing dependency
relationships between packages. This is a good way to illustrate that
design-time view.
I see. That's good, seems natural to, for example, have a "utilities
package" where they will all be nicely put together. And the applications
depend on that package.
The second, dynamic or runtime view of your system would illustrate
instances of your running application, using "structured classes" (a
new feature in UML 2 that is unfortunately poorly understood) or
collaborations to represent components and the links between them. It
would be perfectly legal, for example to show inside a structured class
the instances of stacks and utility classes that are actually used by
a component as well as other instances.
OK, makes sense.
In summary, trying to show two different view in one diagram--can be
confusing. I recommend you untangle those views and draw two-one to
show package/class dependencies and a separate view to show components
and their internal structure. It is always optional how much detail you
can include. If you are interested in more details about collaborations
diagrams and/or structured classes, I'd be happy to send you some more
information...
That's great, Rebecca, thanks. I think the plan will be, then, to capture
the proper role of utilities in a design time package diagram, then to model
my application components as structured classes/components, which should
communicate the semantics that instances of these utilities are actually
inside those components at runtime.
And certainly I would appreciate any information you might like to send
along about structured classes. They seem to be one of THE most important
new features in UML2, yet as you say, they're awfully poorly understood.
Thanks again,
John
.
- References:
- UML Structured class with utility parts?
- From: JMF
- Re: UML Structured class with utility parts?
- From: Rebecca Wirfs-Brock
- UML Structured class with utility parts?
- Prev by Date: Proper state behavior? (was: Question on LSP)
- Next by Date: Re: Question on Effective Java Item 27
- Previous by thread: Re: UML Structured class with utility parts?
- Next by thread: UML inner/nested class associations
- Index(es):
Relevant Pages
|