[Panel-devel] Sensors and Meters in SK
Pedro Suarez Casal
pedro.wotan at mundo-r.com
Sat Sep 10 14:06:18 CEST 2005
El Viernes, 9 de Septiembre de 2005 15:01, Aaron J. Seigo escribió:
> applets should be shielded from the implementation details as much as
> possible and the sensors and meters should be able to be plugged in
> together as simply as possible. using a visitor type pattern keeps the
> implementation specific details as close to the implementation as possible
> in this case.
I agree whith your solution. But I wouldn't use a Visitor pattern, because
this creates an aditional dependence between Sensors and Meters (Sensors
should know something about Meters interface). Perhaps it's better using an
Observer pattern.
In this case, the only difference would be how Meters and Sensors are
connected. Instead of calling a method in the Sensor for creating the
connection, the Meter itself would create it. This way Sensors could be used
with other elements different from Meters.
More information about the Panel-devel
mailing list