Association vs Dependency

From: ShriKant Vashishtha (shrikantv_at_delhi.tcs.co.in)
Date: 12/31/03


Date: 30 Dec 2003 16:48:03 -0800

Hi All,

I am slightly confused in finding the difference between association
and dependency.

For me, whenever the variable is intialized at a local scope or passed
as a parameter in a method, its denoted as dependency. However, for
association, I believe, the object needs to be on global scope (as an
instance variable). However, I rarely use any object at a global
scope, unless I know that it is used for maintaining the state of
class or need to be used across different methods. So most of the
time, I end up with dependency .

Am I missing something over here.

Thanks
-ShriKant



Relevant Pages

  • Re: Association vs Dependency
    ... whenever the variable is intialized at a local scope or passed ... >as a parameter in a method, its denoted as dependency. ... Aggregation and composition (white diamond and black diamond) are ... There is no semantic difference between ...
    (comp.object)
  • Re: Association vs Dependency
    ... > as a parameter in a method, its denoted as dependency. ... > association, I believe, the object needs to be on global scope (as an ... model elements requires other model elements for their specification or ... class the objects need not to be on global scope. ...
    (comp.object)
  • Re: "x.constructor == Foo" vs "x instanceof Foo"
    ... The second declaration for `a' overwrites the reference with one to another ... Javascript variables that aren't declared in a function scope ... named functions defined in the global scope ...
    (comp.lang.javascript)
  • Re: Restricting A Function To Be In Scope of Constructor Method
    ... scope) function is just an external function no fricking matter what, ... External functions know nothing about custom objects they appertain to ... Static protected method constructor of a class constructor. ... completely independent from the Global scope. ...
    (comp.lang.javascript)
  • Re: Universal Groups
    ... Groups with global scope ... For example, to give five users access to a particular printer, you could ... local scope permission to access the new printer. ... with global scope automatically receive access to the new printer. ...
    (microsoft.public.windows.server.migration)