Reading from different posts from this site what I understood that association is more stronger than dependency.
ClassA has association with ClassB -- if ClassB is instantiated by ClassA. ClassA has dependency with ClassB -- if ClassB is passed as parameter in a method or returned as parameter from a method call.
Now consider a case:
Client is using three classes atabase, Model, Element.
Client instantiates Database object, using the Database object gets reference of Model object and after that calls method on Model object to get Element. On the Element object client further calls method to get the element inside the Element object.
In this case, I think relationship should be: Client ---->(Association)-->Database Client ---->(Dependency)--->Model Client---->(Dependency)--->Element
But, I am reading a book, in this book all relationships has been shown as association from the client. Client ---->(Association)-->Database Client ---->(Association)--->Model Client---->(Association)--->Element
I would appreciate for any input.
posted 12 years ago
Martin Fowler says in UML Distilled:
Many UML relationships imply a dependency. The navigable association from Order to Customer in Figure 3.1 means that Order is dependent on Customer. A subclass is dependant on its superclass but not vice versa.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads