Re: Rule against Circular Dependencies?

From: Phlip (phlip_cpp_at_yahoo.com)
Date: 04/22/04


Date: Thu, 22 Apr 2004 14:11:23 GMT

Ken wrote:

> Hi. I'm currently working on an object oriented design standard for
> our project. The subject of circular dependencies between classes has
> come up. My inclination is to have a rule that says they are not
> allowed. However, I've been hard pressed to see such a rule
> recommended out in the OO literature.
>
> Would you recommend such a rule? Could you cite any literature that
> supports such a rule?

That rule is an effect of subtler decoupling rules, but it also helps
prevent logistics problems. Start here:

    The Dependency Inversion Principle
    http://www.objectmentor.com/publications/dip.pdf

> Note that any of our rules can be bypassed via official waiver. So I
> would consider a rule to be necessary if it should hold true 90% of
> the time--and if violating it will create high risk of runtime failure
> or cause maintenance nightmares.

How about a rule that all code is reviewed at the same time as it is
written? That kills many bugs with one stone.

-- 
  Phlip
    http://www.xpsd.org/cgi-bin/wiki?TestFirstUserInterfaces


Relevant Pages

  • Rule against Circular Dependencies?
    ... The subject of circular dependencies between classes has ... My inclination is to have a rule that says they are not ... recommended out in the OO literature. ... Would you recommend such a rule? ...
    (comp.object)
  • Re: Rule against Circular Dependencies?
    ... I'm currently working on an object oriented design standard for ... The subject of circular dependencies between classes has ... > recommended out in the OO literature. ... > Would you recommend such a rule? ...
    (comp.object)
  • Re: math class from Hell (aka Bantys nightmare)
    ... when they have no inclination in that direction can be damaging. ... that direction damaging? ... have been excused from doing English literature in High School? ... Algebra I and Geometry are high school level curricula. ...
    (misc.kids)
  • Re: math class from Hell (aka Bantys nightmare)
    ... when they have no inclination in that direction can be damaging. ... have been excused from doing English literature in High School? ... Exposure to English lit enriches every aspect of life. ...
    (misc.kids)
  • Re: Reading aloud
    ... I would probably recommend Kleist - ... > English literature is rather limited. ... there are all sorts of characters with all sorts of ... speech types as well as the good prose of Dickens himself. ...
    (uk.culture.language.english)

Loading