From: brett l. <bre...@gm...> - 2012-07-08 22:01:52
|
On Sun, Jul 8, 2012 at 4:53 PM, Stefan Frey <ste...@we...> wrote: > *** Current State of Implementation > > Observable/State/Model classes are fully specified, implemented and have > unit tests added. > > I consider the java.util.Observable/Observer implementation is not a > perfect fit for Rails, I preferred to write my own instead. Can you expand on this a bit more? What are the limitations that your version overcomes? > However the Observer interface could potentially change, as I am stil > working on the needs and constraints of the existing GUI. > > Currently an Observer only provides an update(Observable obs, String > text) method. The latter argument provides a text update for the > standard cases. > > I am wondering if I should add a proxy approach, such that the Observer > can specify a function which has to be called that can be specific for > each Observable observed. Or if I should be more restrictive and allow > each Observer to observe ONLY one observable, thus dropping the need to > specify the Observable in the interface method. > In general, I would support the more flexible design. However, I'm not certain of the use cases here. Can you give some examples on why we'd prefer one design over the other? ---Brett. |