As soon as a class's code refers to another class, an association exists -- that is, even passing an instance of a class as a parameter implies an association. It could not be any other way -- a link is an instance of an association and passing instances around involves a links. A dependency between classes is more of a hint. We know there is some vague relationship between those, but they don't ever refer to each other. I have yet to see a useful case of this. Dependencies are much more relevant between packages and components where they indicate communication. Now, there is a school of usage that says that all static references (i.e. the class has an attribute that refers to another class) are modelled by an association and all temporary ones (i.e. passing instances in as parameters, or instantiating them temporarily inside methods) are modelled as dependencies. CASE tools encourage this convention by generating attributes for all associations and making it hard to model non-attribute associations. If you want to do this, and everyone in your team agrees, then there isn't all that much of a problem with it. It is however useful to know why you are breaking the rules. Regards, Huseyin Angay Karabash Ltd. www.karabash.co.uk > ---------- > From: David Day[SMTP:[EMAIL PROTECTED]] > Reply To: David Day > Sent: 30 July 2001 12:41 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: (ROSE) Dependency and Association > > > My understanding is that an association exists between > 2 classes when one class references the other, such as > via an instance variable. The reference is part of > the class definition. > > A dependency between classes is used when no > association exists, but the arguments of an operation > in the 1st class includes the 2nd class as a > parameter. Clearly, a dependency is created since you > can't call the operation without knowing the 2nd class > definition, but the reference isn't an integral part > of the class definition. > > I'm curious to know if anyone has a clearer > understanding. > > --- [EMAIL PROTECTED] wrote: > > > > > > Hi, I am a Rose User. > > > > My problem is : > > when I should use the dependency and > > when I should use the association. > > > > Please tell me about the difference between the > > dependency and > > association. > > > > In the UML1.3 specfication, I wonder what the > > differnce is. > > > > Thanks. > > > > > > > ************************************************************************ > > * Rose Forum is a public venue for ideas and > > discussions. > > * For technical support, visit > > http://www.rational.com/support > > * > > * Admin.Subscription Requests: > > [EMAIL PROTECTED] > > * Archive of messages: > > > http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl > > * Other Requests: [EMAIL PROTECTED] > > * > > * To unsubscribe from the list, please send email > > * > > * To: [EMAIL PROTECTED] > > * Subject:<BLANK> > > * Body: unsubscribe rose_forum > > * > > > ************************************************************************* > > > > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > ************************************************************************ > * Rose Forum is a public venue for ideas and discussions. > * For technical support, visit http://www.rational.com/support > * > * Admin.Subscription Requests: [EMAIL PROTECTED] > * Archive of messages: > http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl > * Other Requests: [EMAIL PROTECTED] > * > * To unsubscribe from the list, please send email > * > * To: [EMAIL PROTECTED] > * Subject:<BLANK> > * Body: unsubscribe rose_forum > * > ************************************************************************* > ************************************************************************ * Rose Forum is a public venue for ideas and discussions. * For technical support, visit http://www.rational.com/support * * Admin.Subscription Requests: [EMAIL PROTECTED] * Archive of messages: http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl * Other Requests: [EMAIL PROTECTED] * * To unsubscribe from the list, please send email * * To: [EMAIL PROTECTED] * Subject:<BLANK> * Body: unsubscribe rose_forum * *************************************************************************
RE: (ROSE) Dependency and Association
Angay, Huseyin (Huseyin)** CTR ** Mon, 30 Jul 2001 07:40:59 -0700
- (ROSE) Dependency and Association glee2000
- Re: (ROSE) Dependency and Associati... David Day
- Re: (ROSE) Dependency and Associati... Liang Peng
- Angay, Huseyin (Huseyin)** CTR **
