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

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
主站蜘蛛池模板: 东港市| 孝感市| 芜湖市| 万载县| 丹巴县| 博客| 江都市| 嘉兴市| 神木县| 弥渡县| 合肥市| 大庆市| 吕梁市| 哈巴河县| 通州区| 女性| 财经| 深水埗区| 泽库县| 濮阳县| 蛟河市| 轮台县| 合水县| 托里县| 建瓯市| 资源县| 秦皇岛市| 黎平县| 浮山县| 筠连县| 五常市| 新田县| 大荔县| 车致| 秦皇岛市| 山东| 大埔区| 凉山| 沅江市| 尖扎县| 余庆县|