|Re: [eclipse-incubator-e4-dev] Fw: Declarative UI roundup?|
To make the runtime a bit more flexible, it does not build the widget structure directly, but generates an XML file (in my case XSWT) that is then rendered by a library. The idea is that it should be fairly easy to use any XML-based UI description language.
The main problem with going through XML and a renderer, is that it only handles the creation process. I still need (in my case) SWT-specific code for attaching listeners and activating/deactivating widgets.
b) Ed is right I think we need a more strongly typed / constrainted description language.
Strongly typing is desirable. But just as important is a uniform way of manipulating the widget structure. By using DOM or EMF, we can manipulate and listen to standardized objects. The mapping to the toolkit API is handled by a toolkit-specific library, containing all necessary toolkit-specific logic. I believe this is Angelo's approach, although he uses DOM rather than EMF.
As I have understood TK-UI so far it uses XUL to described the UI so Angelo has a constrainted description language it only misses an Ecore-Description [1,2]. What I often thought about is that we could have a layered approach here: XAML XUL MXML MySpecialML | | | | ------------------------------ | | Transform (XSLT, ....) | SwtXL => EMF-Modeled SWT-API | SWT-Application This is the concept I currently have in mind for my UFaceKit-Project the only thing I replace there is SWT through UFaceKit and SwtXL through UFaceKitXL.
I don't like the idea of having an SWT-specific model, so UFaceKitXL (EMF model of UFace widgets) is preferable. I guess it is more difficult to make a toolkit-independent model for UFaceKit than one for SWT? E.g. how do you handle things like content providers and cell renderers/editors?
I've already tested this approach in a project I had named EXSWT the only thing missig there was the Ecore-Model for EXSWT .
Which was based on XSWT, wasn't it? I've worked a lot on and with XSWT and its main problem is that (although the language is/looks declarative) it is not designed to handle a live model, i.e. react to changes to the DOM.
Back to the top