Jerry制作的软件工程里Design for Change的培训材料

?If repeating data comprises the fields of a class, use Extract Class to move the fields to their own class.
?If the same data clumps are passed in the parameters of methods, use Introduce Parameter Object to set them off as a class.
?If some of the data is passed to other methods, think about passing the entire data object to the method instead of just individual fields. Preserve Whole Object will help with this.
?Look at the code used by these fields. It may be a good idea to move this code to a data class.

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年8月6日
下一篇 2019年8月6日

相关推荐