This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes a query from Distilled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "a query from Distilled" Watch "a query from Distilled" New topic
Author

a query from Distilled

Deepak Arora
Greenhorn

Joined: Jul 10, 2001
Posts: 26
What is the difference between Transitive Dependencies & compilation Dependencies??
Hey Certified gurus can you help a novice starter??
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Deepak,
If I remember correctly, Transitive dependencies and Compilation dependencies are analogous.
I believe, Fowler says that package dependencies are not transitive in nature.Also, he has explained Transitive dependencies as something where it is difficult to scope of changes with compilation, which means if you make changes in one component, it transcends down to the last dependent component.
Hope this helps,
Sandeep
[This message has been edited by Desai Sandeep (edited July 11, 2001).]


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
Deepak Arora
Greenhorn

Joined: Jul 10, 2001
Posts: 26
Thanks Sandeep
after reading pg no 109, second para which says
There is an obvious simmilarity between these dependencies and compilation dependencies, In fact there a vital difference. With packages, the dependencies are not transitive
on re-reading the para I deduce that
1)package dependencies are simmilar to compilation dependencies
2)with packages dependencies are not transitive &
3)compilation dependencies are transitive.
comment if I am right.But what is compilation dependencies is not yet clear to me.
I have read one another post(by you) where you discussed about generalization among packages.I recall you says that subpackage has some classes associated with classes in super packages
Fowler says (pg 112) that Generalization among packages means specific package must confirm to the Interface of general package
which is simmilar to spec. pers. of class diagram(i.e. subtyping)
I am utterly confused when to create packages & subpackages.
Thanks in advance
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi Deepak,

Originally posted by Deepak Arora:
[..]on re-reading the para I deduce that
1)package dependencies are simmilar to compilation dependencies
2)with packages dependencies are not transitive &
3)compilation dependencies are transitive.

You have correctly mentioned 2) and 3).Compilation dependencies are transitive in nature;Package dependencies are not.Hence, package dependencies cannot be similar to compilation dependencies.So 1) is incorrect.
I believe, Fowler mentions somewhere in that chapter that in case of Package dependencies, there is a sort of "shielding" that takes place to avoid transitive dependencies.If this shielding would not have taken place we could have said both package and compilation dependencies are similar.
As regards Generalization, the subtype should conform to the type defined by the supertype.This according to specification perspective, defines the responsibility of the subtype.This goes with packages as well.So if you have a superpackage and a subpackage linked by Generalization, the subpackage has to conform to the responsibities inherited from the superpackage.
Generalization by default means a dependency from a subtype to a supertype.As Fowler puts it, this is a good way to reduce the overall dependency, since there is no dependency from supertype to subtype.This is because, until runtime the superclass doesnot know the instance of the subclass it is refering to.
Just remember, that you can never eliminate a dependency totally; you can only reduce it.So in the above case, while dependency from subtype to supertype is acceptable, the dependency from supertype to subtype is not desired.
Given a situation(case), you should consider packaging highly specialized classes together.This means classes which are highly coupled/associated comes in the same package.You may then subclass/subpackage classes, which you believe would have a generalization relationship with the superclass/superpackage you just created.This actually means subpackage classes are bound to have some visibility/dependency to superpackage classes because of generalization.
Hope this helps,
Sandeep
[This message has been edited by Desai Sandeep (edited July 11, 2001).]
Deepak Arora
Greenhorn

Joined: Jul 10, 2001
Posts: 26
Thanks Sandeep,
Yaa now I am able to see the light at the end off tunnel (off course with your help), You and other people like you have helped (me and) many others to clarify there doubts I thank you for your valuable contribution to the Forum.
Thanks again
Deepak
By the way do you suggest studying User guide(by three amigos ) and Thinking in pattren (Bruce Eckel) from Examination point of view (Strictly 486), I have read Fowler & Larman already & have one and half years of development experience in Java & XML (I am JCP & IBM Certified XML Developer) & do not have any experience in analysis or designing.
Do you think that my prepration (Larman+Fowler) is enough for me to clear the exam in first attemt as I am a little worried (that exam would be really tough) with not many people scoring a good percentage.
Deepak Arora
Greenhorn

Joined: Jul 10, 2001
Posts: 26
Thanks Sandeep,
Yaa now I am able to see the light at the end off tunnel (off course with your help), You and other people like you have helped (me and) many others to clarify there doubts I thank you for your valuable contribution to the Forum.
Thanks again
Deepak
By the way do you suggest studying User guide(by three amigos ) and Thinking in pattren (Bruce Eckel) from Examination point of view (Strictly 486), I have read Fowler & Larman already & have one and half years of development experience in Java & XML (I am JCP & IBM Certified XML Developer) & do not have any experience in analysis or designing.
Do you think that my prepration (Larman+Fowler) is enough for me to clear the exam in first attemt as I am a little worried (that exam would be really tough) with not many people scoring a good percentage.
wasi_wasi
Greenhorn

Joined: Jul 12, 2001
Posts: 3
perhaps, there is a difference
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi Deepak,
For Test 486, the two recommended books (Larman and Fowler) are good enough.However, you may consider going through User Guide and Reference Guide by Three Amigos, if you have time.However, it is not required for the test.
Make it a point to read Larman and Fowler ATLEAST 2 times.And try to develop some reasoning for the questions in the pre-assessment test.Also, do justice to all the subsections of the test.I missed out on easier sections since I concentrated hard on difficult sections and neglected easier sections.If you follow this procedure and ofcourse the posts in this forum, you are bound to get in excess of 80%.
Good luck,
Sandeep
[This message has been edited by Desai Sandeep (edited July 12, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a query from Distilled