f



Functional issues of cyclic dependencies

Hi,i've read some articles on cyclic dependencies, that they are bad, very bad. But i can't find any real example of functionnal (!= design) issue with them.Do you know any ?
0
Jack
2/5/2008 12:10:29 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

6 Replies
9631 Views

Similar Articles

[PageSpeed] 37

Jack wrote:> Hi,> > i've read some articles on cyclic dependencies, that they are bad, very > bad. But i can't find any real example of functionnal (!= design) issue > with them.> > Do you know any ?> Cyclic dependencies in runtime code isn't bad, but might be an indication of highly coupled design if it is a static cyclic dependency.   What articles have you read? A reference would be nice.-- Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
0
Daniel
2/5/2008 5:27:58 PM
Daniel Pitts a �crit :> Jack wrote:>> Hi,>>>> i've read some articles on cyclic dependencies, that they are bad, >> very bad. But i can't find any real example of functionnal (!= design) >> issue with them.>>>> Do you know any ?>>> Cyclic dependencies in runtime code isn't bad, but might be an > indication of highly coupled design if it is a static cyclic dependency. >  What articles have you read? A reference would be nice.well, using google, i've read:http://www.kirkk.com/blog/index.php?itemid=30- avoiding cyclic dependencies at class/package level avoid them in jarshttp://chasethedevil.blogspot.com/2006/10/how-jdepend-changed-my-java-packaging.html- build system becomes overly complicated- making jars is difficulthttp://architecturerules.googlecode.com/svn/docs/cyclic-dependencies.html
0
Jack
2/6/2008 6:56:17 AM
In article <47a851f1$0$847$ba4acef3@news.orange.fr>, Jack <mlskqd@poqsd.com> wrote:> Hi,> > i've read some articles on cyclic dependencies, that they are bad, very bad. > But i can't find any real example of functionnal (!= design) issue with them.> > Do you know any ?Why would it be a functional issue?  It's only a design issue in that the complexity of maintenance can become unmanageable.  For a small package that performs a specific task, cyclic dependencies may be a perfectly elegant design.  When cycles go beyond the package scope, you increase the risk of overlapping cyclic references prohibiting any changes to the code (spaghetti code).-- I don't read Google's spam.  Reply with another service.
0
Kevin
2/6/2008 7:42:14 AM
Kevin McMurtrie a �crit :> In article <47a851f1$0$847$ba4acef3@news.orange.fr>,>  Jack <mlskqd@poqsd.com> wrote:> >> Hi,>>>> i've read some articles on cyclic dependencies, that they are bad, very bad. >> But i can't find any real example of functionnal (!= design) issue with them.>>>> Do you know any ?> > Why would it be a functional issue?  It's only a design issue in that > the complexity of maintenance can become unmanageable.  For a small > package that performs a specific task, cyclic dependencies may be a > perfectly elegant design.  When cycles go beyond the package scope, you > increase the risk of overlapping cyclic references prohibiting any > changes to the code (spaghetti code).That's the most persuasive point i've read.But still, when i modify a method, i must check all the call sites. Whether the call sites are in the same package doesn't change the difficulty, from my experience.
0
Jack
2/6/2008 8:22:40 AM
Jack wrote:> Kevin McMurtrie a �crit :>> In article <47a851f1$0$847$ba4acef3@news.orange.fr>,>>  Jack <mlskqd@poqsd.com> wrote:>>>>> Hi,>>>>>> i've read some articles on cyclic dependencies, that they are bad, >>> very bad. But i can't find any real example of functionnal (!= >>> design) issue with them.>>>>>> Do you know any ?>>>> Why would it be a functional issue?  It's only a design issue in that >> the complexity of maintenance can become unmanageable.  For a small >> package that performs a specific task, cyclic dependencies may be a >> perfectly elegant design.  When cycles go beyond the package scope, >> you increase the risk of overlapping cyclic references prohibiting any >> changes to the code (spaghetti code).> > That's the most persuasive point i've read.> > But still, when i modify a method, i must check all the call sites. > Whether the call sites are in the same package doesn't change the > difficulty, from my experience.> > > Right, but if you need to change class A, but it affects class B, which affects class C, which in turn affects class A, whoops have to change B again. It becomes difficult to effect change in cyclic dependencies. Once you notice cyclic dependencies getting out of control, you can easily decouple elements with an event system.-- Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
0
Daniel
2/6/2008 7:24:44 PM
Jack wrote:> Hi,> > i've read some articles on cyclic dependencies, that they are bad, very > bad. But i can't find any real example of functionnal (!= design) issue > with them.> > Do you know any ?> In addition to the points that have already been made, it is easier tounit test code without cyclic dependencies.Any subtree, down to a leaf class that depends on nothing else, can betested as a unit, without it caring whether it is being used by one ofits normal callers or by a unit test.Testing a class that depends on the classes that use it tends to requiremore scaffolding.Patricia
0
Patricia
2/9/2008 8:24:06 PM
Reply: