Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>millimoose gave a great answer. It's especially good because it's the right answer for any programming problem :)</p> <p>I would just like to elaborate a bit. When dealing with scenarios like this, the following conditions hold:</p> <ol> <li>Decoupling comes with its own cost.</li> <li>No code will be perfect since you likely won't get all the time you want to work on it.</li> <li>It's not the end of the world if your code is more coupled than it could be.</li> </ol> <p>So don't look at it in terms of an all-or-nothing proposition and instead look at it like a score. How much coupling are you willing to put up with? How much are you willing to pay for decoupling? At some point there's a balance between design time and perceived maintainability -- keeping in mind you don't even know how your code will change anyway.</p> <p>Have you heard of the book "Event-Based Programming: Taking Events to the Limit"? It's all about coupling: <a href="http://books.google.com/books?id=9CL446IzhuAC&amp;pg=PR21&amp;dq=taking+events+to+the+limit&amp;hl=en&amp;sa=X&amp;ei=bcfLUMzRMcWLqgHi-oHoBw&amp;ved=0CDUQ6wEwAA" rel="noreferrer">http://books.google.com/books?id=9CL446IzhuAC&amp;pg=PR21&amp;dq=taking+events+to+the+limit&amp;hl=en&amp;sa=X&amp;ei=bcfLUMzRMcWLqgHi-oHoBw&amp;ved=0CDUQ6wEwAA</a></p> <p>The author claims that you can't eliminate all coupling, but you can transform it, and coupling should be shifted to simpler classes. Perhaps you can use that as a guide for your efforts.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload