On the chance you're still reading this thread (it's a few days old but still on the front page), I'll add my two pennies worth...

My first response is it is time to refactor.

I often see this sort of thing more as a result of growth and usefulness rather than actual design. First came Module A which was spiffy and had many a good use. Then came Module B and it did much that was cool as well, not the least of which was to make use of A. The story goes on and potentially includes a little creative refactoring of A to make use of D thus creating the circular dependancies.

There are other reasons this happens, such as trying to modularize a relational database and choosing a bad criterion for the initial code seperation. eg. seperating code by client (I've seen it) becaues it was thought the code would never be useful to other clients. Another reason is seperating code by what it does rather than what it does it for (the basis of OO). eg. are we going to copy a file, ftp it, sftp it, or are we doing a Document->move? If you break our code up based on the functions, we often find them being so closely similar to other functions we end up coupling them.

Regardless of whether this design came about over time and wild growth or whether it was designed that way up front, my guess is, if you take a look at how they are currently designed and currently being used, you will find it not so difficult to refactor them into something that is not so convoluted, and considerablly cleaner.

Code, for all we might prefer it to not be, is alive, not static. It grows and changes, as does the need and uses for it. Often times one drives the other and vice-versa. If it's starting to feel uncomfortable (and causing you to question it's validity in public), start reworking it. Your code will thank you for the attention and respond with pleasant purrs and playful barks...


In reply to Re: So much interconnectedness - good or bad? by KeighleHawk
in thread So much interconnectedness - good or bad? by kiat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.