Remote Application Platform

The Remote Application Platform ( RAP short, formerly Rich Ajax Platform) is an Eclipse plugin for developing Web 2.0 applications (Ajax ) based on the Java programming language (not to be confused with the scripting language JavaScript).

The development of a remote Application Platform application differs from the traditional model of the development of a Web 2.0 application from the effect that the programmer no HTML, JavaScript and XML skills must have, but a system based only on Java program designs. These may be used in many Java and Eclipse libraries and frameworks.

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

History

RAP was developed under the name "Rich Ajax Platform ", which specializes in the development of Eclipse plugins Karlsruhe company Innoopract information systems and is available under the Eclipse Public License as open source for free. With the release of version 2.0 of the RAP was to "Remote Application Platform " renamed to make the universal character of the Platform has become clear.

Technical Background

Ajax

Web 2.0 applications based on Ajax, which for " Asynchronous JavaScript and XML" is short. Ajax is a combination of known techniques for quite some time for the presentation and automation of Web pages. The interplay of all these technologies enables the asynchronous loading of content within a Web page without having to completely reload. This allows the development of interactive websites that have the same functionality as a desktop application. A well-known example is the Web 2.0 Text Editor Google Drive.

In order to develop such a Web 2.0 application, first a rudimentary HTML framework needs to be created which is responsible for the arrangement of all visual elements. To format the layout so created, is embedded a cascading style sheet. Thus, it is possible to display the website on different devices and for users with limited perception capabilities accessible.

Now be integrated with the help of JavaScript and XML interactive elements. The web page can receive and send data, process them locally and manipulate the content accordingly. If external content are needed, so JavaScript can download them via XMLHttpRequest from a remote server. For operations that go beyond the capabilities of JavaScript, server- level programming languages ​​such as PHP, Perl or Java can be integrated.

Rich Client Platform

The Remote Application Platform seeks to facilitate the operation of the Web 2.0 programming. To better understand this process, the understanding of the fundamentals is first necessary.

Eclipse builds on the principle of the rich client. This in turn is based on the so-called fat client. The fat client is divided superficially into two layers: At the lowest layer, the local data processing of the program takes place. You can usually find a GUI, which is a Graphical User Interface of the overlying layer. For connection to a programming language provides the Rich Client API.

As already mentioned, the Rich Client is an extension of a fat client. For data processing and GUI is added a plugin layer. A plugin is a simple way to extend the functionality of an existing platform.

In theory:

  • Operate various plugins conflict-free parallel with each other
  • Plugins are application-and platform-independent
  • Plugins are easy to maintain

Based on these paradigms the Rich Client Platform ( RCP short ) was created by Eclipse. The RCP is a collection of many logical and visual components that serve the development of Java programs. Thus, the RCP for example, offers the Standard Widget Toolkit ( SWT short ) which is used for creating native visual surfaces, ready help and update GUIs, XML tools and much more. In addition, the RCP is the Eclipse Public License as open source freely available and is constantly evolving.

Remote Application Platform

The Remote Application Platform ( RAP short ) combines the best of the worlds of Ajax and the Rich Client Platform. It offers Java programmers a powerful, unified 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 Apache Tomcat, Jetty, etc. running the Java program and sends the data to the client ( ie, a browser). The existing SWT interface elements are replaced by RWT ( Qooxdoo ), ie HTML and Ajax for the browser.

Installation

If Eclipse is already installed, the installation of RAP designed simple via update site. Alternatively, there are pre-built packages on the RAP website.

Implementation

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

Within Eclipse Plugin Development perspective is to be changed and a new project by: created "New Project > Plug-in Project > RAP Hello World".

In the class " Application" is written now following method:

/ / Hello World in RAP public text txt;   public display createUI () { Display display = new Display ();   Shell shell = new Shell (display); / / Create a new window shell.setSize (320, 240); / / Set the size of the window   txt = new Text (shell, SWT.SIMPLE ); / / Create a text field txt.setLocation (. shell.getClientArea () x 10, shell.getClientArea () y 40. ); / / Position and scale text box   Button button = new Button (shell, SWT.PUSH ); / / Create Button button.setText ("Hello World!"); / / Set the button text button.setBounds (. shell.getClientArea () x 10, shell.getClientArea ( ) y 10, shell.getClientArea () width - 20, 20. . ); / / Button position and scale button.addSelectionListener (new Selection Listener () { / / add listener to the button to intercept the click on public void widgetDefaultSelected ( SelectionEvent e) { } public void widgetSelected ( SelectionEvent e) { txt.setText ("Hello World!"); / / When clicking "Hello World! " spend in the text box } });   shell.open (); / / Open window   return display; } Use on other platforms

Can be implemented in such a building on the Remote Application Platform with frameworks such as Tabriz Java applications that their user interactions are executed on platforms such as Android or iOS. The code for the presentation and user interaction while running natively on each platform, which communicating with the server via JSON. This makes it possible to write Java applications for platforms that do not support Java itself.

677641
de