More and more of the associated object how to design

 As the project must constantly integrate a variety of devices, each integrated a completely different equipment that they will rather cumbersome, to invade a lot of code has been written, for example, the control class of device, you need to write control log, such as this added a new fan control wind speed needed to write the log, control switches and so need to write the log, the log like this before and I want to be controlled by the same log table, this is the case, such a log table will need to associate a lot of control objects, each compatible with the new device, we need to change the log table, increasing the objects associated with it, find it very troublesome.

And in the future the code will become more and more bloated, more and more difficult to control, do not know there is no good solution to

 

Guess you like

Origin www.cnblogs.com/LcxSummer/p/10945685.html