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 #516236] Tue, 23 February 2010 05:21 Go to next message
Wolfgang Geck is currently offline Wolfgang Geck
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 #520415 is a reply to message #516236] Fri, 12 March 2010 05:14 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANG
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
>
>
Re: The way XWT should work [message #520448 is a reply to message #520415] Fri, 12 March 2010 07:39 Go to previous messageGo to next message
Wolfgang Geck is currently offline Wolfgang Geck
Messages: 4
Registered: July 2009
Junior Member
Oh i'm sorry, please let me clear up the misunderstanding:
I just have finished reading the article about XWT but unfortunately have forgotten a single and in this case very important word.

And yes I agree with your correction: If I prefer using XWT the way i explained above i am able to
(except the fact that IDs for controls should be mandatory to ensure a solid cornerstone for later GUI tesing, but that's doubtless a matter of taste)

My first impression of XWT was that this technology is to complex and requires to much communication between designers and programmers.

But sorry, I missed one important fact: the tooling

Cause good GUI tools can fill this gab and so don't worry to much about my objections i will surely give XWT a try in the future.

All the best
Wolfgang




Re: The way XWT should work [message #520578 is a reply to message #520448] Fri, 12 March 2010 15:53 Go to previous message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
"Wolfgang Geck" <info@glue-box.de> wrote in message
news:hndcmt$j9o$1@build.eclipse.org...
> Oh i'm sorry, please let me clear up the misunderstanding:
> I just have finished reading the article about XWT but unfortunately have
> forgotten a single and in this case very important word.
> And yes I agree with your correction: If I prefer using XWT the way i
> explained above i am able to (except the fact that IDs for controls
> should be mandatory to ensure a solid cornerstone for later GUI tesing,
> but that's doubtless a matter of taste)
>
> My first impression of XWT was that this technology is to complex and
> requires to much communication between designers and programmers.

It is complex because it provides more features. If you want deal only UI
control, it is very simple.

Regards
Yves YANG
>
> But sorry, I missed one important fact: the tooling
>
> Cause good GUI tools can fill this gab and so don't worry to much about my
> objections i will surely give XWT a try in the future.
>
> All the best Wolfgang
>
>
>
>
>
Re: The way XWT should work [message #570202 is a reply to message #520415] Fri, 12 March 2010 07:39 Go to previous message
Wolfgang Geck is currently offline Wolfgang Geck
Messages: 4
Registered: July 2009
Junior Member
Oh i'm sorry, please let me clear up the misunderstanding:
I just have finished reading the article about XWT but unfortunately have forgotten a single and in this case very important word.

And yes I agree with your correction: If I prefer using XWT the way i explained above i am able to
(except the fact that IDs for controls should be mandatory to ensure a solid cornerstone for later GUI tesing, but that's doubtless a matter of taste)

My first impression of XWT was that this technology is to complex and requires to much communication between designers and programmers.

But sorry, I missed one important fact: the tooling

Cause good GUI tools can fill this gab and so don't worry to much about my objections i will surely give XWT a try in the future.

All the best
Wolfgang
Re: The way XWT should work [message #570303 is a reply to message #520448] Fri, 12 March 2010 15:53 Go to previous message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
"Wolfgang Geck" <info@glue-box.de> wrote in message
news:hndcmt$j9o$1@build.eclipse.org...
> Oh i'm sorry, please let me clear up the misunderstanding:
> I just have finished reading the article about XWT but unfortunately have
> forgotten a single and in this case very important word.
> And yes I agree with your correction: If I prefer using XWT the way i
> explained above i am able to (except the fact that IDs for controls
> should be mandatory to ensure a solid cornerstone for later GUI tesing,
> but that's doubtless a matter of taste)
>
> My first impression of XWT was that this technology is to complex and
> requires to much communication between designers and programmers.

It is complex because it provides more features. If you want deal only UI
control, it is very simple.

Regards
Yves YANG
>
> But sorry, I missed one important fact: the tooling
>
> Cause good GUI tools can fill this gab and so don't worry to much about my
> objections i will surely give XWT a try in the future.
>
> All the best Wolfgang
>
>
>
>
>
Previous Topic:e4 and git repository (for org.eclipse.e4.ui.model.workbench)
Next Topic:XWT callback to specific instance
Goto Forum:
  


Current Time: Wed Aug 27 21:29:20 EDT 2014

Powered by FUDForum. Page generated in 0.02021 seconds