Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] JFace Data Binding/The New Binding API

My point was to decide for an API to implement a binding _expression_ syntax within a small library I am developing at the moment [1].

The _expression_ syntax looks like this:

"Full name: {path=firstName} {path=lastName}"

Which is the same result as Stefan just presented, but without much databinding API noise.

The intention is to also support auto detection of the model type (beans, emf, or what else would be available).

[1] https://github.com/erdalkaraca/lambda-ui#databinding

2016-05-11 16:31 GMT+02:00 Stefan Xenos <sxenos@xxxxxxxxxx>:
I'm definitely a fan of making Obervables interoperable with as many different programming models as possible... but I wouldn't personally choose streams or iterables as the mechanism for combining observables - at least not in my own code.

That would create a programming model very much like rxjava -- which works fine, but it's quite hard to debug and it requires memorizing a lot of operators. My own preference is to use ComputedValue as the mechanism for combining observables.

For example:

IObservableValue<String> fullName = ComputedValue::create(() -> {return firstName.getValue() + " " + lastName.getValue();})

It's definitely less general than a stream-based approach, but I find the code much more readable in the (very common) cases where it works. That said: we should definitely support utilities that make it easy to interoperate between observables and steams, etc.

I'm not familiar with infinite iterables. How would you actually combine them?

On Wed, May 11, 2016 at 9:42 AM David Orme <djo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I'll have to look at the code to appreciate the implications of this.

House about these thoughts: 

- Create adapters for IObservables to Java 8's streams
- Adapt IObservables to lazy infinite Iterables using a Java continuations library and provide ways to compose groups of Iterables into combined streams.  Then reactive code can be expressed as loops over Iterables and state can stay with the code that operates on it.

See also: the Cells Manifesto.  Sorry, I'm typing on my phone so don't have the link handy.

Dave


On Wed, May 11, 2016, 8:09 AM Stefan Xenos <sxenos@xxxxxxxxxx> wrote:
The Bind class described there would provide a fluent form way to create bindings, but IMO an even better approach would be to use ISideEffect as a replacement for bindings and data binding context. It can do everything bindings could, but it's much more flexible. Simon has already written a number of examples.

  - Stefan

On Wed, May 11, 2016 at 9:01 AM David Orme <djo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I have interest in picking this up again, but have a few other things on my plate to attend to first.  (My blog has been idle for awhile but if you watch Planet Eclipse, hopefully sooner than later you'll see that change.)  On the other hand, my current employer gives my cycles to work on this sort of thing.

What were you wanting to see happen?  I have ideas too...

(I was one of data binding's original architects along with Boris Bokowski.)

Dave


On Wed, May 11, 2016, 5:45 AM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
Hi Erdal,

AFAIK nobody is currently working on this branch. AFAIK Stefan Xenos
(cc) cherry-picked and reworked some of the generics works from this
repo but any further enhancement of databinding did occur in the main
platform UI repository.

Best regards, Lars

On Fri, May 6, 2016 at 5:58 PM, Erdal Karaca <erdal.karaca.de@xxxxxxxxx> wrote:
> Hi all,
> I checked out the git repo of the "New Binding API", but it seems there is
> not much activity.
>
> The DataBindingContext class provided a possibility for aggregating status
> of its bindings. With the new proposal this does not seem to be possible
> anymore.
>
> What are the plans for the "New Binding API"?
>
> https://wiki.eclipse.org/JFace_Data_Binding/The_New_Binding_API
>
> Best regards,
> Erdal
>
> _______________________________________________
> e4-dev mailing list
> e4-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/e4-dev



--
Eclipse Platform UI and e4 project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev

_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev


Back to the top