RCP application / build for both desktop and web?


As most of us know, when starting a new project it's the old difficult decision to choose between rich client and web applications. Effectively, it's either web or rich client. Especially when developing Eclipse rich client applications, it's just desktop. Sure, cool techniques like RAP could be used to exchange SWT by web ready JavaScript libraries. Moreover, e4 enables to use different rendering engines for example JavaFX. But again, it's a either SWT or another UI library decision. So why not using a combination of both SWT for the desktop and HTML, JavaScript for the web? Too complicated. Really? An what if an RCP application already exists? There's a solution too. I'd like to show the steps necessary to prepare an Eclipse RCP application to be ready for the desktop as well as for the web.

  • Separate model and UI bundles (if not already done)
  • Tweak the preferences handling (avoid the "org.eclipse.jface" dependency in the model bundle)
  • Create a web bundle (servlets) to access your application

If the RCP application is designed well, it's no problem to re-use the model bundles for the web. Because we rely on OSGi, Eclipse Virgo offers great capabilities to run the model bundles and the servlets to access the applications functionality. Finally, both the RCP and web application can be build using Maven/Tycho without making additional rendering engine modifications. Hence, a combination of both worlds is not just only possible, it keeps you flexible for decisions in the future.

I'll give a live demo!

Session details
Speaker(s): Session Type: Experience level:
Track: Tags:
Schedule info
Session Time Slot(s):
Wednesday, November 4, 2015 - 17:00 to 17:35