Rich Client Platform Application Development Using Eclipse Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Rich Client Platform is a platform for building and deploying rich client applications. It offers a much richer user experience than is possible via Web technologies. RCP is the minimal set of plugins required for developing rich client applications. In this paper we introduce the RCP application development using the Eclipse IDE

The typical rich client application is a stand-alone executable with a graphical interface composed of several controls for the user. The Java world has seen a tremendous increase in the number and quality of prefabricated soft- Page Layout ware components both commercial and freely available but one thing hasn't changed yet: the mode of composition. For individually deployable Java components, we're always either implementing framework interfaces or using a library's dedicated functionality.

Rich Client Platform

A Rich Client Platform (RCP) is software consisting of the following components:[1]

A core (microkernel), lifecycle manager

A standard bundling framework

A portable widget toolkit

File buffers, text handling, text editors

A workbench (views, editors, perspectives, wizards)

Data binding

Update manager

The programmers can build their own applications on existing platforms. Instead of having to write a complete application from scratch, the programmers can use the the framework provided by the platform. Building on a platform facilitates faster application development and integration, while the cross-platform burden is taken on by the platform developers.

The programs built with RCP platforms are portable to many operating systems while being as rich as client-server applications which use so called fat clients or traditional clients. Open source examples are the Eclipse and Net Beans for Java. We know that java is platform independent and that's the reason why we have selected the java framework for the RCP application development.

Eclipse RCP

Eclipse: It is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. The Eclipse Platform is an IDE for anything, and for nothing in particular .The Eclipse Platform is built on a mechanism for discovering, integrating, and running modules called plug-ins. A tool provider writes a tool as a separate plug-in that operates on files in the workspace and surfaces its tool-specific UI in the workbench.[3]. When the Platform is launched, the user is presented with an integrated development environment (IDE) composed of the set of available plug-ins. Eclipse employs plug-ins in order to provide all of its functionality on top of (and including) the runtime system. The runtime system of Eclipse is based on Equinox, an OSGi standard compliant implementation. [3] This plug-in mechanism is a lightweight software componentry framework. With the exception of a small run-time kernel, everything in Eclipse is a plug-in. This means that every plug-in developed integrates with Eclipse in exactly the same way as other plug-ins; in this respect, all features are "created equal".

Eclipse RCP: The Eclipse RCP application requires only two plugins: org.eclipse.ui and org.eclipse.core.runtime, and their prerequisites. An Eclipse RCP application can decide to use parts of these components. It is possible to design headless Eclipse based applications, then only the runtime is necessary. Eclipse RCP allows developers to use the eclipse platform to create flexible and extensible desktop applications. The OSGi runtime provides the framework to run the modular application.SWT is the standard UI component library used by Eclipse. JFace provides some convenient API on top of SWT. The workbench provides the application frame.

In the Eclipse Platform a Perspective determines the visible actions and views within a window.  Perspectives also go well beyond this by providing mechanisms for task oriented interaction with resources in the Eclipse Platform, multi-tasking and information filtering. In the Eclipse Platform a view is typically used to navigate a hierarchy of information, open an editor, or display properties for the active editor

Eclipse RCP Architecture

The most important architectural characteristic of Eclipse is the Plugin architecture. Eclipse applications are built as a number of plugins which define their API and their dependencies. Their API - public classes which can be used by other plugins. Their dependencies - package or plugins which are required for the plugin to run correctly.[4]

Fig. 1 Eclipse RCP architecture

Each plugin can define extension-points which define possibilities for functionality contributions (code and non-code) by other plugins. The fig 1 shows the eclipse RCP architecture.A plugin can use extensions, e.g. provide functionality to these extension points. Plugins which define extension points open themselves up for other plugins. An extension points defines a contact how other plugins can contribute.

Eclipse RCP Application

Main components of an Eclipse RCP application

Main program - A RCP main application class implements the interface IApplication. This class can be viewed as the equivalent to the main method for standard Java application.

Eclipse expects that the application class is defined via the extension point org.eclipse.core.runtime.application.[4]

A Perspective - The perspective is extended from org.eclipse.ui.perspective

Workbench Advisor- invisible technical component which controls the appearance of the application (menus, toolbars, perspectives, etc)An Eclipse RCP application has two main configuration files: MANIFEST.MF - contains the OSGi configuration information. plugin.xml - Information about the extensions and extension points

RCP Text Editor Example

To understand the RCP application lifecycle we are considering the development of a RCP editor.

The RCP Text Editor Example is a simple RCP application (figure 2 )that creates own text editors using the text editing infrastructure (an optional RCP component) and offers text editing capabilities such as shifting, moving and deleting lines, find/replace, auto-completion and basic syntax highlighting for markup languages.

Fig. 2 Snap shot of the Eclipse RCP Text Editor

To run the example in binary form:

fig 3 : to start the RCP in eclipse

1. Download the RCP Runtime Binary from the Eclipse Project downloads page and extract it to a folder such as c:\texteditor-example. The eclipse subfolder of this location will be referenced as <install_dir> below.

2. Download the Platform Text Binary and extract it into <install_dir>/plugins subfolder.

3. Download the RCP Text editor example plug-in and save it into the <install_dir>/plugins subfolder.

4. Replace the <install_dir>/configuration/config.ini file with this one.

5. Run the eclipse executable: For example, on Windows, run <install_dir>/eclipse.exe.

To load the RCP text editor example source into your workspace:

1. Download the texteditor source plug-in and save it on your harddisk.

2. Choose File > Import... > Existing Project into Workspace.

3. Click the Browse... button to select the zip file you downloaded in step 1.

4. Press Finish.

To run the example from your workspace:

fig 4 : shows the run part of the application

1. Choose Run > Open Run Dialog...

2. Under Run-time Workbench, there should be a new launch configuration: RCP Text Editor.

3. Click Run.

4. When the RCP Text Editor Example window opens, use File > Open to open a plain text, .xml, or .html file.

The source code of the rcpdemo application consists of the following

RcpdemoPlugin: Since every rich client application is an Eclipse plug-in, it needs a plug-in class. The generated implementation provides access to the plug-in instance and loads the resource bundle.

Application: This is the bootstrap class for the rich client application. This class creates and runs the workbench that contains the main event loop.

Perspective: To arrange UI elements inside the workbench, you technically need a perspective. For now, it doesn't contain anything interesting, since the rcpdemo application doesn't contain any view or editor.

Basic Elements of an RCP Application

fig 5 : contents of rcp demo application

ApplicationActionBarAdvisor: The action bar advisor provides hooks for filling the different action bars like the menu bar and the cool bar. It also configures the status line and creates the actions.

ApplicationWorkbenchAdvisor: The workbench advisor provides a number of hooks around the lifecycle of the workbench itself. One of the most important jobs is to provide the

ApplicationWorkbenchWindowAdvisor: The workbench window advisor provides a number of hooks around the lifecycle of the workbench window. For example it allows setting the window size before it is opened.


In this Paper we presented the learning's that we had in developing RCP based applications using Eclipse IDE .The OSGi Runtime support for the Eclipse IDE makes it the eclipse stand out in developing the RCP applications .The Eclipse IDE manages dependencies and lifecycle . RCP can produce high quality products in many configurations. RCP development expands the boundaries of the application and pushes to think about frameworks of the application and how others will integrate into the product. In this paper we have identified the foundation concepts implied in the design of Rich Internet Applications