Re: UML: Associations between classes and packages
- From: Matthias Kaeppler <nospam@xxxxxxxxxxxxxxx>
- Date: Wed, 25 May 2005 07:35:59 +0200
Robert C. Martin wrote:
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
Well, thanks! I'll do that.
-- Matthias Kaeppler .
- References:
- UML: Associations between classes and packages
- From: Matthias Kaeppler
- Re: UML: Associations between classes and packages
- From: Robert C . Martin
- UML: Associations between classes and packages
- Prev by Date: Re: Class Design Question
- Next by Date: Re: UML: Associations between classes and packages
- Previous by thread: Re: UML: Associations between classes and packages
- Next by thread: Calling a constructor from another
- Index(es):
Relevant Pages
|