Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-incubator-e4-dev] Declarative UI


I would like speak about UFace that I'm using into TK-UI and I find very helfull to manage Declarative UI.  With TK-UI you can describe UI with any XML Markup (XUL, XHTML,...) and render it into any renderer (SWT, SWT Forms, Swing...) Today I'm using UFace which is UI facade which provide a lot of think like Databinding (based on JFace Databinding). I like UFace because anything can be bounded :

* UI widgets  : any properties of (visible, text... properties if UI widgets). For instance if you call setVisible, it fire event so it's possible after to observe this property (with SWT we cannot catch this visble event for instance).
* UI Layout : any properties of layout (ex : orientation)  can be bounded. So after you could bound checkbox withy orientation layout.
* UI Layout data : any properties of layout data (ex : width)  can be bounded. So after you could bound slider with width of Text widget.

So after it's very easy to bind DOM elements, attributes with UI Uface widgets.

I have send you simple sample (tkui-sample.odt and tkui-sample.doc) which show you TK-UI capability (layout, layout-data, UI widgets binding managed with JFace Databinding).

This sample show you several capabilities :

* UI widget binding :  JFace Databinding is used to bind UI element (Text, Label...) with
  XML Markup Model (DOM attributes, elements are bounded with UI).
* UI layout binding : layout is bounded too DOM attribute to change at runtime the layout (see orient explanation).
* UI layout-data binding : layout data is bounded too DOM attribute to change at runtime the layout data (see width explanation).
* UI is not managed directly with SWT, but it use UFace which provide UI facade. It's interesting to have UI facade because
  with the same XML Markup you can render it with several UI tollkit (SWT, SWT Forms, Swing, GWT, QT Jamby...).
  For this point I know you are not interested with Swing, BUT imagine that UFace implement the UI facade with VE, GEF, Java2d...
  and we will able to use the same XML Markup to manage thoses render.
* XUL is used as XML Markup, BUT TK-UI is not linked to only XUL. I'm managed XHTML XML Markup to manage HTML Table layout.
  And you can add your own XML Markup and you can MIX several XML Markup (XML Markup is indentified with XML namespace).
* DBEL (Databinding _expression_ language) where you can manage Databinding with decalarative neams (eg : XAML _expression_ language).

Regards Angelo

2008/11/10 Hallvard Trætteberg <hal@xxxxxxxxxxx>

Kevin McGuire wrote:

Hallvard, good summary.


A) A "literal" model of the UI.

This is the target of most XML formats. Although XSWT and XAML are different in some respects, I believe they both target this. The difference is to what extent they describe a process of building the UI or the state of the final UI. The latter will more easily support a live model, since changes to the DOM will be easier to map to "equivalent" changes to the UI.

B) An abstract model of UIs (say, functional).

This is the target of a lot of research within my community (model-based UI design), including my own Diamodl. As you say, this does not replace A), but builds upon it.

These two aren't mutually exclusive.  If you're doing (B), its probably handy having (A) so you can do a model to model transformation as the path to instantiating the actual widgets.

Yes, this is exactly why I'm using XSWT in my model-based runtime.

You haven't touched upon the concept of live model. Should it be based on XML's DOM? What is the benefit of using (a modeling framework like) EMF?

eclipse-incubator-e4-dev mailing list

Attachment: tkui-sample.odt
Description: application/vnd.oasis.opendocument.text

Attachment: tkui-sample.doc
Description: MS-Word document

Back to the top