Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » The way XWT should work
The way XWT should work [message #568903] Tue, 23 February 2010 10:21 Go to next message
Wolfgang Geck is currently offline Wolfgang GeckFriend
Messages: 4
Registered: July 2009
Junior Member
I just have finished the article about XWT in the german 'Eclipse Magazin'. Interesting technology, i'm looking forward to, but please let me explain some problems i see from a programmers point of view:

Why does XWT force the UI-designer to reference backing beans and why must designers care about data binding. Instead of a clear separation between presentation and business logic you mix both technologies in a too complex xml definition.

The designers one and only job is layouting UI controls in a user interface. Initializing data binding and validation, attaching label- or contentproviders, event handling etc. is (in my opinion) the programmers field of activity.

The current java xml coupling is really difficult to understand. What about the following solution:

<Shell xmlns="http://www.eclipse.org/xwt/presentation"
xmlns:x="http://www.eclipse.org/xwt">
<Shell.layout>
<FillLayout/>
</Shell.layout>
<Button text="Hello, world!" name="t1">
</Button>
</Shell>


1.The XWT UI description does not reference any java classes
2. Each UI control needs a unique id or name (this is mandatory)

XWT.open(uri,showIDS);

3. If a special flag is set on the XWT instance all rendered
elements display their given unique id (in a tooltip whatever), that makes it easier to find the id for a specific control.( on top of that mandatory ids makes unit testing much easier)

Once the UI is initialized the programmer can start doing his job.

Since it is simple to get the controls corresponding id its simple to reference the control and initialize it.

Text text =xwt.findByName("t1");
initListeners(text)
initModel(text)
initDatabinding(text)

Let the programmer init the business logic, its not that time consuming. The designer can still rearrange the controls or modify fonts whatever.
Re: The way XWT should work [message #570087 is a reply to message #568903] Fri, 12 March 2010 10:14 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 687
Registered: July 2009
Senior Member
Hi,

Please see my comments below:

"Wolfgang Geck" <info@glue-box.de> wrote in message
news:hm0a6s$m6u$1@build.eclipse.org...
>I just have finished the article about XWT in the german 'Eclipse Magazin'.
>Interesting technology, i'm looking forward to, but please let me explain
>some problems i see from a programmers point of view:

Great! When will the English version be available ?

>
> Why does XWT force the UI-designer to reference backing beans and why must
> designers care about data binding. Instead of a clear separation between
> presentation and business logic you mix both technologies in a too complex
> xml definition.
> The designers one and only job is layouting UI controls in a user
> interface. Initializing data binding and validation, attaching label- or
> contentproviders, event handling etc. is (in my opinion) the programmers
> field of activity.

The modern UI framework provides more features for data presentation to
simplify the developer's life, that includes the data binding. So does XWT.

There are several kinds of developers: Business developer, Graphic Designer,
UI Component Developer etc.. XWT is in fact a foundation to support the
Presentation development for all kinds of users. And each user can use XWT
directly or indrectly via a tools such as Visual Designer. For sure, some
aspects can be visible for one kind of users, and be hidden for another. It
is the responsability of tools.

>
> The current java xml coupling is really difficult to understand. What
> about the following solution:
>
> <Shell xmlns="http://www.eclipse.org/xwt/presentation"
> xmlns:x="http://www.eclipse.org/xwt">
> <Shell.layout>
> <FillLayout/>
> </Shell.layout>
> <Button text="Hello, world!" name="t1">
> </Button>
> </Shell>
>
>
> 1.The XWT UI description does not reference any java classes

It is possible. You can use the CLASS_PROPERTY option when you call load()
method.

> 2. Each UI control needs a unique id or name (this is mandatory)

Each UI Element may have a unique id via the attribute "name" or "x:Name".

>
> XWT.open(uri,showIDS);
>
> 3. If a special flag is set on the XWT instance all rendered elements
> display their given unique id (in a tooltip whatever), that makes it
> easier to find the id for a specific control.( on top of that mandatory
> ids makes unit testing much easier)
>
> Once the UI is initialized the programmer can start doing his job.
> Since it is simple to get the controls corresponding id its simple to
> reference the control and initialize it.
>
> Text text =xwt.findByName("t1");
> initListeners(text)
> initModel(text)
> initDatabinding(text)

It is already possible.

>
> Let the programmer init the business logic, its not that time consuming.
> The designer can still rearrange the controls or modify fonts whatever.

XWT provides a solution to minimize the Java code, it is very important for
the tools.

Regards
Yves YANG
>
>
Previous Topic:e41.0M4 NPE with gadget view
Next Topic:RCP can not say hello world
Goto Forum:
  


Current Time: Wed Nov 26 05:48:26 GMT 2014

Powered by FUDForum. Page generated in 0.01819 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software