My definition:
A dependency is used when the referenced class is not directly used inside the referencing class, but only passes trough the class. For example:
A customerDAO would have a dependency to a customerTO, since the DAO uses to TO to store it in database, but it has no direct association with the TO (the TO is not a instance variable of the DAO).
In the assumption this is more or less correct, I have a question about this:
Supose I have an SSB forwarding requests to another class (called 'Processor'), and that particular class is being looked up by a factory
pattern. But since the class diagram is high level, I do not want to draw the factory pattern. So I have only two classes , the SSB and the Processor class (which is an interface). Now, should I draw a association or a dependency between the SSB and that class ?
I feel like drawing a dependency, since an association would tell that the SSB has the processor as an instance variable. This is rather strange since the Processor class is an interface. Further more, its not said that at the end the SSB will have the real class (ProcessorImpl for example) as an instance variable. It might as well have the factory as instance variable and lookup the ProcessorImpl class in each method using the factory instance variable (asuming the factory has a caching mechanism or something)....
Any suggestions ?