Remote application platform

from Wikipedia, the free encyclopedia
Remote application platform
Basic data

developer Eclipse Foundation
Current  version 3.9
(June 19, 2019)
operating system Java VM
programming language Java
category Eclipse plugin
License Eclipse Public License
German speaking No
www.eclipse.org/rap

The remote application platform (abbreviated RAP , formerly Rich Ajax Platform ) is an Eclipse - plug-in , the development of Web 2.0 applications ( Ajax ) based on the programming language Java .

The development of a remote application platform application deviates from the traditional model of developing a Web 2.0 application in that the programmer does not need to have any knowledge of HTML , JavaScript or XML , but instead designs a program based exclusively on Java. Many Java and Eclipse libraries and frameworks can be used for this purpose.

Furthermore, the existing Rich Ajax Platform source code can be adapted for a desktop application with little additional effort and compiled as such .

history

RAP was developed under the name "Rich Ajax Platform" by the Karlsruhe company Innoopract Informationssysteme, which specializes in the development of Eclipse plugins, and is freely available as open source under the Eclipse Public License . With the release of version 2.0, RAP was renamed "Remote Application Platform" in order to emphasize the more universal character of the platform.

Technical background

Ajax

Web 2.0 applications are based on Ajax , which stands for "Asynchronous JavaScript and XML". Ajax is a combination of techniques for displaying and automating websites that have long been known. The interaction of all these technologies enables the asynchronous reloading of content within a website without having to reload it completely. This enables the development of interactive websites that have the same range of functions as a desktop application . A well-known example is the Web 2.0 text editor Google Docs .

In order to develop such a Web 2.0 application, a rudimentary HTML framework must first be created, which is responsible for the arrangement of all visual elements. A cascading style sheet is embedded in order to format the layout created in this way . This makes it possible to display the website in a barrier-free manner on different devices and for users with limited perceptual abilities.

Interactive elements are now integrated with the help of JavaScript and XML . The website can receive and send data, process it locally and manipulate the content accordingly. If external content is required, JavaScript can download it from a remote server using XMLHttpRequest . For operations that go beyond the functional scope of JavaScript, higher-level programming languages such as PHP , Perl or Java can be integrated on the server side .

Rich Client Platform

The Remote Application Platform tries to make the Web 2.0 programming process easier. In order to better understand this process, it is first necessary to understand some of the basics.

Eclipse is based on the rich client principle . This in turn is based on the so-called fat client . On the surface, the fat client is divided into two layers: The local data processing of the program takes place on the lowest layer. On the layer above there is usually a GUI , i.e. a graphic user interface. The rich client offers an API for connection to a programming language .

As already mentioned, the rich client is an extension of the fat client. A plug-in layer is added to the data processing and GUI. A plug-in is a simple way of expanding the functionality of an existing platform.

In theory:

  • different plugins work in parallel with each other without conflict
  • plugins are application and platform independent
  • plugins are easy to maintain

The Rich Client Platform ( RCP for short ) from Eclipse was created on the basis of these paradigms . The RCP is a collection of many logical and visual components that are used to develop Java programs . For example, the RCP offers the Standard Widget Toolkit ( SWT for short ) which is used to create native visual interfaces, ready-made help and update GUIs, XML tools and much more. In addition, the RCP with the Eclipse Public License is freely available as open source and is constantly being further developed.

Remote application platform

Demo 'RAP Mail Template'

The Remote Application Platform ( RAP for short ) combines the best of the worlds of Ajax and the Rich Client Platform . It offers Java programmers a powerful, uniform framework for creating Web 2.0 applications.
RAP is based on a client-server structure . On the server side there is an application server such as B. Apache Tomcat , Jetty etc. which executes the Java program and sends the data to the client (i.e. to a browser ). For the browser, the existing SWT interface elements are replaced by RWT ( Qooxdoo ), i.e. HTML and Ajax.

installation

If Eclipse is already installed, the installation of RAP is very easy via the update site . Alternatively, there are ready-made packages on the RAP website .

implementation

The following is an illustrative example of developing a RAP application based on SWT .

Within Eclipse, you switch to the plug-in development perspective and create a new project via: "New Project> Plugin Project> RAP Hello World".

The following method is now written in the "Application" class:

// Hello World in RAP
public Text txt;

public Display createUI() {
	Display display = new Display();

	Shell shell = new Shell(display); // Neues Fenster anlegen
	shell.setSize(320, 240); // Größe des Fensters festlegen

	txt = new Text(shell, SWT.SIMPLE); // Textfeld erstellen
	txt.setLocation(shell.getClientArea().x + 10, shell.getClientArea().y + 40); // Textfeld positionieren und skalieren

	Button button = new Button(shell, SWT.PUSH); // Button erstellen
	button.setText("Hello World!"); // Button-Text festlegen
	button.setBounds(shell.getClientArea().x + 10, shell.getClientArea().y + 10, shell.getClientArea().width - 20, 20); // Button positionieren und skalieren
	button.addSelectionListener(new SelectionListener(){ // Listener zum Button hinzufügen, um den Klick darauf abzufangen
		public void widgetDefaultSelected(SelectionEvent e) {}
		public void widgetSelected(SelectionEvent e) {
			txt.setText("Hello World!"); // Bei Klick "Hello World!" im Textfeld ausgeben
		}
	});

	shell.open(); // Fenster öffnen

	return display;
}

Use on other platforms

Building on the remote application platform, frameworks such as Tabris can be used to implement Java applications in such a way that their user interactions are carried out on platforms such as Android or iOS. The code for the display and user interaction runs natively on the respective platforms, communication with the server takes place via JSON. This makes it possible to write applications in Java for platforms that do not even support Java.

Web links

Individual evidence

  1. RAP Insights Blog: Introducing "RAP Insights" ( Memento of the original from January 15, 2008 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / rapblog.innoopract.com
  2. Eclipse Rich Ajax Platform 1.0 available . Golem News
  3. Rich Client Platform FAQ Eclipse Wiki
  4. ^ Rich Client Platform . Eclipse Wiki
  5. Eclipse: RAP Demos
  6. Eclipse Configuration for RAP at Google Code
  7. ^ RAP About from Eclipse Projects
  8. Videos on RAP installation and demo creation. ( Memento of the original from March 18, 2008 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. The Screencast Blog @1@ 2Template: Webachiv / IABot / www.thescreencast.com
  9. Tabris - native iOS and Android apps with Java and RAP