官术网_书友最值得收藏!

Code smells that indicate you might need DI

The saying to a man with only a hammer, every problem looks like a nail is old and yet is never truer than in programming. As professionals, we should be continually striving to acquire more tools to be better equipped for whatever our job throws at us. DI, while a highly useful tool, is useful only for particular nails. In our case, these nails are code smells. Code smells are indications in the code of a potentially deeper problem.

There are many different types of code smell; in this section, we will examine only those that can be alleviated by DI. In later chapters, we will reference these smells as we attempt to remove them from our code.

Code smells generally fall into four different categories:

  • Code bloat
  • Resistance to change
  • Wasted effort
  • Tight coupling
主站蜘蛛池模板: 遂川县| 屯昌县| 涟源市| 大港区| 溆浦县| 台江县| 定边县| 陆良县| 青神县| 大宁县| 阜新市| 句容市| 凤台县| 泗阳县| 东港市| 保德县| 紫阳县| 宁明县| 通辽市| 呼伦贝尔市| 赤壁市| 东山县| 三明市| 临城县| 仲巴县| 井冈山市| 黎城县| 广州市| 襄垣县| 武宣县| 定州市| 仙桃市| 奎屯市| 屏南县| 陇川县| 阜宁县| 永川市| 肃南| 宁安市| 乡城县| 墨江|