Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Control RCP App on Server over Web Interface (RAP)
Control RCP App on Server over Web Interface (RAP) [message #73534] Mon, 09 October 2006 08:26 Go to next message
Eclipse UserFriend
Originally posted by: janos.varadi.googlemail.com

I have been reading various articels about RAP (Rich Ajax Platform). I also
read the article on http://www.eclipse.org/proposals/rsp/
and I am really interested in developing applications which are reusable for
Web and RCP.

I looked at the different ways, how to render Java Applications which run on
the server. I am not sure if I understood it right. Is it correct, that an
instance of a real GUI enabled Java (RCP) application is started on the
server and basically triggered by an Web App (e.g. Ajax enabled)? If yes,
does anybody have any code examples? I am looking right now at Echo2. They
proceed a similar way.

My idea is to run the rcp application (one instance per user, OSGI enabled)
in a servlet. A web App would be able to trigger actions on the server and
the RCP app would respond to the Web App.
Basically if I push a button on the web app, the equivalent Button is pushed
on the RCP App instance on the server.

Thanks for your help.


Janos V.
Re: Control RCP App on Server over Web Interface (RAP) [message #73603 is a reply to message #73534] Sat, 14 October 2006 13:31 Go to previous message
Eclipse UserFriend
Originally posted by: jkrause.innoopract.com

Hello Janos,

answers below:

Janos Varadi wrote:
> I have been reading various articels about RAP (Rich Ajax Platform). I also
> read the article on http://www.eclipse.org/proposals/rsp/
> and I am really interested in developing applications which are reusable for
> Web and RCP.
>
> I looked at the different ways, how to render Java Applications which run on
> the server. I am not sure if I understood it right. Is it correct, that an
> instance of a real GUI enabled Java (RCP) application is started on the
> server and basically triggered by an Web App (e.g. Ajax enabled)?

No, that is not exactly the case. Until now there is a different API for
the UI in RAP (W4T), so you need to rewrite the UI and reuse the core
plugins (if you follow some rules, see below).

We are working on a new implementation of a widget toolkit that will be
as close to the SWT api as possible, but we think that we can't get to
binary compatibility. A first demo will be available shortly, maybe you
want to subscribe to the rap mailing list (a link to subscribe is on
http://eclipse.org/rap/). In any event it is not the "instance of a real
GUI enabled Java" that is running on the server, but an implementation
of the UI toolkit emitting JavaScript to the browser. You are right that
a representation of the applications UI is held in memory on the server
for every session.

> If yes,
> does anybody have any code examples? I am looking right now at Echo2. They
> proceed a similar way.

If you would like to try out an example that shows how to use the same
core plugins for a rcp and a rap application you can find a description
and the projects making up the example here:

http://wiki.eclipse.org/index.php/RapExamples

>
> My idea is to run the rcp application (one instance per user, OSGI enabled)
> in a servlet. A web App would be able to trigger actions on the server and
> the RCP app would respond to the Web App.

The approach you mention would require a new classloader for every
session. This does not scale very well, and there are often issues with
garbage collection.

> Basically if I push a button on the web app, the equivalent Button is pushed
> on the RCP App instance on the server.

The events are indeed processed at the server side, but not by pushing a
button on the RCP app. The push of the button triggers an event at the
client side (browser), which will result in a request to the server. The
server determines which button has been pressed and executes the event.

If you want to reuse plugins between client and server, they either need
to be stateless or they need to be aware of the user session. Again, you
may want to have a look at the example above.

>
> Thanks for your help.
>
>
> Janos V.
>

Jochen Krause
RAP project
Re: Control RCP App on Server over Web Interface (RAP) [message #601088 is a reply to message #73534] Sat, 14 October 2006 13:31 Go to previous message
Jochen Krause is currently offline Jochen KrauseFriend
Messages: 72
Registered: July 2009
Member
Hello Janos,

answers below:

Janos Varadi wrote:
> I have been reading various articels about RAP (Rich Ajax Platform). I also
> read the article on http://www.eclipse.org/proposals/rsp/
> and I am really interested in developing applications which are reusable for
> Web and RCP.
>
> I looked at the different ways, how to render Java Applications which run on
> the server. I am not sure if I understood it right. Is it correct, that an
> instance of a real GUI enabled Java (RCP) application is started on the
> server and basically triggered by an Web App (e.g. Ajax enabled)?

No, that is not exactly the case. Until now there is a different API for
the UI in RAP (W4T), so you need to rewrite the UI and reuse the core
plugins (if you follow some rules, see below).

We are working on a new implementation of a widget toolkit that will be
as close to the SWT api as possible, but we think that we can't get to
binary compatibility. A first demo will be available shortly, maybe you
want to subscribe to the rap mailing list (a link to subscribe is on
http://eclipse.org/rap/). In any event it is not the "instance of a real
GUI enabled Java" that is running on the server, but an implementation
of the UI toolkit emitting JavaScript to the browser. You are right that
a representation of the applications UI is held in memory on the server
for every session.

> If yes,
> does anybody have any code examples? I am looking right now at Echo2. They
> proceed a similar way.

If you would like to try out an example that shows how to use the same
core plugins for a rcp and a rap application you can find a description
and the projects making up the example here:

http://wiki.eclipse.org/index.php/RapExamples

>
> My idea is to run the rcp application (one instance per user, OSGI enabled)
> in a servlet. A web App would be able to trigger actions on the server and
> the RCP app would respond to the Web App.

The approach you mention would require a new classloader for every
session. This does not scale very well, and there are often issues with
garbage collection.

> Basically if I push a button on the web app, the equivalent Button is pushed
> on the RCP App instance on the server.

The events are indeed processed at the server side, but not by pushing a
button on the RCP app. The push of the button triggers an event at the
client side (browser), which will result in a request to the server. The
server determines which button has been pressed and executes the event.

If you want to reuse plugins between client and server, they either need
to be stateless or they need to be aware of the user session. Again, you
may want to have a look at the example above.

>
> Thanks for your help.
>
>
> Janos V.
>

Jochen Krause
RAP project
Previous Topic:Internationalization of plugin
Next Topic:Question about lifecycle of Bundle
Goto Forum:
  


Current Time: Thu Mar 28 11:44:47 GMT 2024

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

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

Back to the top