Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 167

Comment by Filip Milovanović on Exposing dependencies results in "fat" constructor. What should you do next?

$
0
0
Next, you should take the fat constructor as a signal, an indicator telling you that your class is trying to do too much on its own, and decompose it, so that it delegates the details of various tasks to a couple of smaller classes with a more narrowly defined job; with these few classes replacing your old dependencies. Then go down one level and repeat if needed.

Viewing all articles
Browse latest Browse all 167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>