Re: UML: Associations between classes and packages
- From: Robert C. Martin <unclebob@xxxxxxxxxxxxxxxx>
- Date: Tue, 24 May 2005 06:12:50 -0500
On Sun, 22 May 2005 14:00:46 +0200, Matthias Kaeppler
<nospam@xxxxxxxxxxxxxxx> wrote:
>Hi,
>
>I was wondering in how far it is allowed to mix class and package
>diagrams in UML.
You have my permission to mix them as much as is necessary to get your
point ac cross.
UML does not put a constraint upon this. Nor should it.
>
>Example:
>Say I have a class which inherits from javax.swing.JFrame. It would be
>stupid to introduce the class JFrame with its huge interface into the
>model, since it's part of the platform anyway.
Don't confuse UML with the tools that draw it. If a tool makes it
inconvenient to do something that you would like to do, you should
reconsider the tool.
>But somehow I have to model the relationship between my custom Frame
>class and JFrame, so I thought I'd just draw a dependency from my class
>to the swing package. But the I'd have both classes and packages
>together in one diagram.
That's allowable.
>Is that legal? And if so, what kind of line notation do I have to use, a
>simple dotted line?
Sure. Or create a stereotype on the dependency
<<class-to-package dependency>>
You drive the notation, don't let the notation drive you.
-----
Robert C. Martin (Uncle Bob) | email: unclebob@xxxxxxxxxxxxxxxx
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716
"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
.
- Follow-Ups:
- Re: UML: Associations between classes and packages
- From: Matthias Kaeppler
- Re: UML: Associations between classes and packages
- References:
- UML: Associations between classes and packages
- From: Matthias Kaeppler
- UML: Associations between classes and packages
- Prev by Date: Re: Dated info: Mentor acquires Project Technology
- Next by Date: Re: Lahman, how ya doing?
- Previous by thread: Re: UML: Associations between classes and packages
- Next by thread: Re: UML: Associations between classes and packages
- Index(es):
Relevant Pages
|