Eclipse RAP

From WikiEducator
Jump to: navigation, search

Content extracted from Java Specialists wiki. Updates here.

There were some open questions in the discussion which were to specific for a bigger group: Please ask again if there's anything you like to know, so we can add it here - Rgra ...

Eclipse RAP, RCP and Java Modularity
Convenor: Marc Hoffmann, John Kost, Andreas Gellendin
  • Rabea
  • Uberto
  • Andriy
  • Maz

Java Modularity


  • OSGI framework can be used to split a big monolitic application into smaller parts (bundles)
    • Principle: divide and conquer
  • Application servers provide OSGI support
    • Question: Is the whole specification support needed for the servers or would a smaller subset suffice?
    • Answer: Plugins can be easily exchanged if a different configuration is needed, which is f.e. good for companies with support for different countries which like to exchange only the bundles for one country
  • New bundles can be easily added and can enhance the functionality of the application
  • Bundles can be targeted to specific architectures and operating systems (target platforms in eclipse RCP)
  • Multiple versions of a library can co-exist if other bundles need a specific version because of the classloader architecture of OSGI


  • Would be good to split into modules for not having to deploy Swing and AWT f.e. if you use SWT
  • Ongoing discussion in the java mailing lists about dividing the JDK into smaller modules by using OSGI or having an own implementation (Jigsaw)


  • Eclipse RCP (SWT) provides Equinox as implementation of the OSGI specification
    • SWT uses the native components of the operating system, which make the App integrate in the environment (can also be used Standalone)
    • JFace provides an easier view above SWT which provides some of the funtionalities known from Swing/AWT
    • Features, Plugins, Fragments are the building blocks of an application
    • Target Platforms form the base for application development by aggregating needed plugins, features and fragments
    • Dependency management with versioning is supported. You can define that the plugin needs a specific version range of another plugin.
    • Low coupling by using interfaces and extension points to communicate between bundles
    • Support for internationalization (or customization) through fragments which provide additional resources for a host bundle
  • Netbeans RCP (Swing)

Andriy made a comment that SWT is not flexbile enough:

  • Subclassing is not allowed in SWT by default. However this is possible to subclass by overriding the method checkSubclass() if needed. Eclipse Foundation suggests wrapping an existing SWT widget instead. There is more information regarding this question in the next F.A.Q.. And as Rabea rightly mentioned if wrapping of widgets is needed it has to be done only once
  • SWT is not a part of JDK. SWT requires native libraries for each supported system. Swing seems to be more portable
  • Some time ago SWT outperformed Swing (at least on Windows platform). But with latest JDKs there is almost no difference in their performance

Please add your problems here

Eclipse RAP

  • easy Transformation of a RCP Desktop Application into a web application (Single Sourcing)
    • Eclipse UI implementation bundles have to be exchanged by the according RAP implementation bundles by using a different target platform and imports instead of dependencies
  • Load Tests possible with Apache JMeter: RAP/LoadTesting
  • RAP Demos

Build Tools

Short discussion on how to build OSGI applications

  • Uberto: Apache Felix
  • Marc: Maven Tycho
  • Maz: Ant headless build
  • Andreas: Ant headless build (pluginbuilder)
  • Don't use plain SWT, but use JFace or any other framework which does not annoy you with stupid display or layout problems