Combine RCP and Web applications

Subscribers:
24,000
Published on ● Video Link: https://www.youtube.com/watch?v=TnnkZZjtVCE



Duration: 29:41
1,179 views
5


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 RCP applications, it's just desktop. Sure, cool techniques like RAP could be used to exchange SWT by web ready JavaScript libraries. Moreover, e4 enables us to use different rendering engines for example JavaFX. But again, it's an either SWT or another UI library decision. So why not using the same codebase and a combination of both SWT/JavaFX for the desktop and HTML, CSS and JavaScript for the web? Too complicated! Really? 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
Tweak the preference handling (avoid the "org.eclipse.jface" dependency in the model bundle)
Find a solution for the Eclipse extension point registry
Create a web bundle 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!
For instance, Eclipse Virgo offers great capabilities to run the model bundles and the servlets to access the applications functionality. We'll have a look at the a combination with the following server side technologies:

* Eclipse Virgo
* OSGi enRoute
* Spring Boot

Finally, both RCP and Web application are build using Maven/Tycho without making additional rendering engine modifications. You stay in one workspace, which makes refactorings comfortable.
Hence, a combination of both worlds is not just only possible, it keeps you flexible for decisions in the future.







Tags:
EclipseCon Europe
2016
Eclipse
RCP