Closed ccutrer closed 4 years ago
I would keep the architecture more open. Introducing a sensor interface would restrict the setup too much. I would introduce an interface for every characteristic, because there are numerous combinations. I understand the idea behind, but I fear it will not work for all accessories. Perhaps somebody has an idea to solve the problem. If not, I would copy the impl part for every class providing the optional characteristic. (most of the time not too many)
rather than have everyone implement an interface directly for every concrete accessory
also refactor in an AbstractSensor[Service] base class/interface so taht all the different sensors don't have to repeat their optional characteristics