Skip to content

Commit 053e60b

Browse files
committed
Add link to newer article
1 parent 7f6540f commit 053e60b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_posts/2018-08-27-on-constructor-over-injection.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ <h3 id="ac21c35680d34943a1827d94e2e18533">
134134
This is only guidance. There could be cases where it's genuinely valid to have dozens of dependencies. I'm being deliberately vague, because I don't wish to go into an elaborate example. Usually, there's more than one way to solve a particular problem, and occasionally, it's possible that collecting many services in a single class would be appropriate. (This sounds like a case for the <a href="https://en.wikipedia.org/wiki/Composite_pattern">Composite</a> design pattern, but let's assume that there could be cases where that's not possible.)
135135
</p>
136136
<p>
137-
This is similar to using <a href="https://en.wikipedia.org/wiki/Cyclomatic_complexity">cyclomatic complexity</a> as a guide. Every now and then, a big, flat switch statement is just the best and most maintainable solution to a problem, even when it has a cyclomatic complexity of 37...
137+
This is similar to using <a href="https://en.wikipedia.org/wiki/Cyclomatic_complexity">cyclomatic complexity</a> as <a href="/2019/12/09/put-cyclomatic-complexity-to-good-use">a guide</a>. Every now and then, a big, flat switch statement is just the best and most maintainable solution to a problem, even when it has a cyclomatic complexity of 37...
138138
</p>
139139
<p>
140140
Likewise, there could be cases where it's genuinely not a problem with dozens of constructor arguments.

0 commit comments

Comments
 (0)