What is the difference in UML terms between a package and a component?

From: Andrew Watters (akwatters_at_hotmail.com)
Date: 10/30/04


Date: Sat, 30 Oct 2004 15:10:47 GMT

Firstly, apologies for the long post and thank you if you have the time to
read it. I would appreciate any input.

What I'm trying to do.
I'm drawing an architectural view that shows the key packages/components,
their relationships and the layer they belong to. If it helps: the
packages/components are things like Member, Commodity, Services; the layers
are Interface, Application, Domain, Infastructure.

Why I'm confused.
I started drawing both a package diagram and a component diagram to see how
things developed (using Together) and then realised that I can put
susbsytems on the component diagram. I think a subsytem is a stereo type of
a package (p482 of 'Agile Software Development' seems to agree with this
although the notion of this indicating behaviour has only increased my
confusion).
Also, I've gotten used to thinking of packages in java terms so that
com.xxx.member is a package. In this case the package is also a component,
by that I mean that I can build a member.jar. Some of my components contain
multiple java package trees. Having reverse engineered the classes using
Together I find that packages are shown inside each other. For example, if I
have package x and x.y, x.y is shown inside x. I think this means that
package x.y can see package x (and vica-versa) and additionally x
effectively hides x.y to anything outside x.

So various questions.
What is the diference between a package and a component? And a subsystem?
Is my package understanding correct - do sub-packages express information
about scope as I have described? And if this is so why does Together assume
x.y is inside x? Should I be renaming all my java packages?
For my view should I be using a package or component diagram?

Thanks
Andrew



Relevant Pages

  • Re: What is the difference in UML terms between a package and a component?
    ... I have a fairly black-and-white definition of package vs. component. ... confusion comes from. ... > I started drawing both a package diagram and a component diagram to see how ... > multiple java package trees. ...
    (comp.object)
  • Re: Quirk with generics
    ... Creating a new Java package within the project. ... Creating four new source files within the package. ... Deleting the project, its package, and the four source files. ... That could easily take half an hour or more, and requires messing with my IDE potentially disturbing the way I'd had it. ...
    (comp.lang.java.programmer)
  • Re: Sun Java installation issues
    ... Install any java package from the Ubuntu package ... java package isn't already installed from the Ubuntu repo. ... I don't get it - I was recommending installing the package from the repo, ...
    (Ubuntu)
  • Re: Broken iWork 09 FACT
    ... longer just a package, as '08 files are. ... This also works for DOCX files. ... The only reason they are made up as URLs is to avoid ... except that Java package names reverse the ...
    (comp.sys.mac.advocacy)
  • Re: Sun Java installation issues
    ... Install any java package from the Ubuntu package repository, ...
    (Ubuntu)