Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP architectural question
RAP architectural question [message #130397] Mon, 27 April 2009 14:33 Go to next message
Eclipse UserFriend
Originally posted by: s0181013.mail.inf.tu-dresden.de

Hello everyone,

how do I know which java classes will be mapped on to qooxdoo classes?

Here the scenario which triggered that question:
I've put a SashForm, containing some labels and textfields, into a
composite. Depending on the composite's size, that can be changed by the
simly resizing it, the form alignment will switch from horizontal to
vertical.

Later on I thought that at least the form could have been implemented
with Qooxdoo and asked myself if the initial case was a serversided
implementation or will it be clientsided because the java classes will
be translated into qooxdoo.

Thanks

Jes
Re: RAP architectural question [message #130882 is a reply to message #130397] Thu, 30 April 2009 09:20 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

> how do I know which java classes will be mapped on to qooxdoo classes?

If you are familiar with the RWT code, you can find out by looking at
the renderInitialization method in the related LCA.

> Here the scenario which triggered that question:
> I've put a SashForm, containing some labels and textfields, into a
> composite. Depending on the composite's size, that can be changed by the
> simly resizing it, the form alignment will switch from horizontal to
> vertical.

This should be possible with plain SWT. Add a resize listener on one of
the children and call SashForm#setOrientation accordingly.

> Later on I thought that at least the form could have been implemented
> with Qooxdoo and asked myself if the initial case was a serversided
> implementation or will it be clientsided because the java classes will
> be translated into qooxdoo.

No, there is no Java to Javascript translation in RAP.

Regards, Ralf
Re: RAP architectural question [message #130936 is a reply to message #130882] Sun, 03 May 2009 11:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: s0181013.mail.inf.tu-dresden.de

Hello,

first of all, thank you for your answer!

>> how do I know which java classes will be mapped on to qooxdoo classes?
>
> If you are familiar with the RWT code, you can find out by looking at
> the renderInitialization method in the related LCA.
>
>> Here the scenario which triggered that question:
>> I've put a SashForm, containing some labels and textfields, into a
>> composite. Depending on the composite's size, that can be changed by the
>> simly resizing it, the form alignment will switch from horizontal to
>> vertical.
>
> This should be possible with plain SWT. Add a resize listener on one of
> the children and call SashForm#setOrientation accordingly.

This is exactly what I did, therefore I did not use a LCA. Anyway there
has to be some kind of mapping (see text below).

>> Later on I thought that at least the form could have been implemented
>> with Qooxdoo and asked myself if the initial case was a serversided
>> implementation or will it be clientsided because the java classes will
>> be translated into qooxdoo.
>
> No, there is no Java to Javascript translation in RAP.

O.k. the word 'translate' was not chosen very well. I meant that there
are Qooxdoo Classes, used as Proxies. So Java Classes will be mapped on
to Qooxdoo classes. According to the scenario above, the sashForm (SWT)
has to have a Qooxdoo-Pendant resembling a sashForm, because the
source-code of the webapplication only has Qooxdoo-Code within
script-Tag with everything that has to be rendered.

Now, if I would not have written the sashForm in Java but directly in
Qooxdoo - independently wether this would be circuitous or not - would
this be a clientsided implementation whereas the former variant would
have been a serversided implementation or will it always be clientsided
because of the necessary mapping?

Best regards

Jes
Re: RAP architectural question [message #131049 is a reply to message #130936] Mon, 04 May 2009 09:17 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Jessica,

>>> Later on I thought that at least the form could have been implemented
>>> with Qooxdoo and asked myself if the initial case was a serversided
>>> implementation or will it be clientsided because the java classes will
>>> be translated into qooxdoo.
>>
>> No, there is no Java to Javascript translation in RAP.
>
> O.k. the word 'translate' was not chosen very well. I meant that there
> are Qooxdoo Classes, used as Proxies. So Java Classes will be mapped on
> to Qooxdoo classes. According to the scenario above, the sashForm (SWT)
> has to have a Qooxdoo-Pendant resembling a sashForm, because the
> source-code of the webapplication only has Qooxdoo-Code within
> script-Tag with everything that has to be rendered.

In SWT, the SashForm is a "custom" widget, i.e. it does not use a native
widget but is composed out of other SWT widgets (Composites and Sashes).
The same is true for RWT, thus there is no need for a dedicated SashForm
LCA. There are only Sashes and Composites (Sash and CanvasLayout in qx).

> Now, if I would not have written the sashForm in Java but directly in
> Qooxdoo - independently wether this would be circuitous or not - would
> this be a clientsided implementation whereas the former variant would
> have been a serversided implementation or will it always be clientsided
> because of the necessary mapping?

The idea of RAP that you don't have to deal with any Javascript code.
You write the same plain Java code as you would do for SWT and don't
care about the client.

Of course, you could also write your own widget (on client and server)
to implement the desired functionality. But this would be a lot of work
and you would not gain much. You couldn't even save the server-side
turnarounds since the enclosed widgets still need to resize.

HTH, Ralf
Previous Topic:FormText in standalone RWT
Next Topic:Theme Developer is needed
Goto Forum:
  


Current Time: Sat Feb 04 23:11:31 GMT 2023

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

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

Back to the top