[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] e4 and EMF-Databinding

Am 09.05.11 15:49, schrieb Eric Moffatt:
> Tom, thanks a lot for doing this...with the advent of tablets many of
> the 'standard' UI paradigms are being revisited / revamped and ensuring
> that e4 can be used *directly* on new platforms is a real win.

... right and that's the thing i really enjoy about our design. The
Eclipse 4.x Application Platform provides anybody an advanced
Widget-Toolkit agnostic UI-Framework which is built around modern
software concepts like OSGi, services and DI.

> Do you (or anyone else..;-) know if someone has tried to do an Android
> rendering implementation? It would be really interesting to see how well
> the model maps onto the tablet UI's metaphors...

Not yet but well never say never

> Perhaps we should start discussing what new package structures we need
> to reflect this. Also we might start looking to see if we can refactor
> JFace to allow viewers for non-SWT platforms...

Refactoring the current viewer code to make this possible is not really
possible but takeing the concepts starting from scratch is possible and
well strange enough I have already done it in my UFaceKit-Project which
comes with a base Viewer-Library and concrete implementations for:
* Swing
* Qt

But with the availability of Eclipse Databinding I'm not sure the viewer
stuff is really needed because most UI-Frameworks come with their own
MVC-Support and so all that is needed is a databinding integration into
the toolkit specific MVC idea.

Take for example Swing vs SWT and how to setup a Combo-Box.

ObservableListContentProvider cp = new ObservableListContentProvider();
IObservableList l = ...;
IObservableMap m = ...;

Combo combo = new Combo(parent,SWT.READ_ONLY);
ComboViewer viewer = new ComboViewer(combo);
viewer.setLabelProvider(new GenericObservableMapLabelProvider("{0}",m));

Swing (with Eclipse Databinding from UFaceKit):
IObservableList l = ...;
IObservableMap m = ...;

JComboBox combo = JComboBox();
ObservableComboBoxModel<Country> model = new
      ObservableComboBoxModel<Country>(l, m);
  new ObservableListCellRender<Country>(model,
        new GenericLabelDelegate<Country>("{0}")

> I have to say that SWT still brings very significant advantages to
> enterprise applications where its cross-platform abilities are more
> important than the complete flexibility that the direct API gives.
> Having said that it's also very, very important to e4's success that it
> allows adoption of the new UI platforms (at least those that use
> Java...;-).

Agreed - I'm very happy that we managed to build up the EAP like this
and one of my main interests for the next e4 development cycle is to
make at least one other UI-Technology a first class citizen on EAP.