[Panel-devel] Sensors and Meters in SK

Pedro Suarez Casal pedro.wotan at mundo-r.com
Sat Sep 10 17:44:39 CEST 2005


El Sábado, 10 de Septiembre de 2005 14:06, Pedro Suarez Casal escribió:
> 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.

In fact, Ryan, Alexander (wirr) and me were working on that after the meetup, 
and we'd made an UML diagram with our conclusions. I thought this was known 
by more people, and I didn't send that to Vinay before...

Our idea was to use the Observer pattern as I said in the previous mail. I 
send you it so you can give your opinion. It's an Umbrello diagram.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: karamba.xmi.gz
Type: application/x-gzip
Size: 20524 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20050910/5549060f/karamba.xmi-0001.gz


More information about the Panel-devel mailing list