[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] [DataBinding] Does there exist a BufferedObservable?

Hi,

I'm currently evaluating a switch from jgoodies databinding
(using mostly self-defined SWT bindings) to jface/eclipse
databinding.

JGoodies databinding provides two useful concepts among others -
BufferedValueModel and PresentationModel - where I currently
found no counter parts in jface databinding, even though I'm
sure they could be easily built on top of the API. Before I roll
my own implementation I would like to ask, whether they are
already provided, but possibly with a different name (which would
be not surprising to me, because jface databinding clearly and intentionally defines it's own concepts).


Here a short description of what I mean:

A BufferedValueModel is actually some IObservableValue which holds
a reference to another IObservableValue (like a delegate). We could
represent it by the following interface

interface IBufferedObservableValue extends IObservableValue {
  void triggerCommit();
  void triggerFlush();
}

Any modifications on the wrapper *only* act on the wrapper (which
has it's own value element), and *no* delegation happens to the
wrapped observable. But if anyone invokes triggerCommit() on the
IBufferedObservableValue, then the internally hold observable's
value is set with the current value of the buffer. On the other
hand, if triggerFlush() is used, the buffer is reset to the value of
the internally hold observable - quite simple but useful.

A Presentation model is more or less a access point for observables.
It is typically constructed with a bean and is used as the actual
API for clients that ask for observables. Clients aren't aware,
which kind of data is wrapped, they just ask for a property from a
bean (This is very similar to querying BeanProperties, but the
difference is that the PresentationModel already knows the bean,
so the client query *only* provides the property name to access the
corresponding property).

I would be happy to know, if anyone is aware of existing
implementation in jface databinding that already match these
concepts or - if not - if jface databinding would be interested
in some contribution of such concepts.

Thanks in advance,

Daniel Krügler