As the title let you mention the tutorial was about bringing an Eclipse RCP into the web. The idea of single source for desktop and web is not new, but in the last time more and more projects start providing a framework that may really work in the field.

Rap is providing a bridge of the SWT shell to the web. All eclipse.swt controls (at least they told me) have been ported to the web in the rap packages. Others e.g. nebular are still missing. Supporting your control to be able to render in the rap framework, which by the way can be done by everybody, is hard work to do because you have to implement the web representation and the javascript code for the communication. In RAP the client (browser) does not know anything about the state and the processing logic, this code is just running on the server.

As Eclipse in its current state is just a single user application there are several issues. Until now developers don’t have to to care about the context of the user because there is always just one instance running with one user running. Eclipse used Singletons heavily within the RCP and so did developers. Of course because RAP is just starting one instance of the Eclipse RCP this have several disadvantatges and will in several cases lead to illegal states of the application (e.g Shopping Basket where several users would just access one instance). This status will change with the e4 which is in the pipe but not shipped until now.

Most of the code can be used in both worlds the RCP and the web but some is only needed or hast to be changed for one of them. Because of that they used the OSGi Fragments to support the functionality of replacing information depending on the client they are running on.

For the web they did a grate job to allow styles and layouts that the application does look more like an web application then just an RCP within the browser. See the two screenshost below to find out what is possible with thees techniques.

rap14 rap2

Future: For the future they try to define some kind of generic protocol for the client server communication and to think about using gwt to generate code for their client controls.

Conclusion:
RAP did a grate job in my opinion nevertheless I have to say that there are still some weaknesses. For me the project makes sense for smaller RCP applications but not for complex ones. Sadly moste of the applications we are speaking about are the complex ones.

Presentation

Share and Enjoy:
  • Digg
  • del.icio.us